pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jean-Michel POURE <jm.poure@freesurf.fr>
To: Manuel Trujillo <manueltrujillo@dorna.es>
To: pg-admin <pgsql-admin@postgresql.org>
Subject: Re: Locale support
Date: Thu, 14 Feb 2002 14:21:00 +0100
Message-ID: <200202141321.g1EDL1L11745@www1.translationforge> (raw)
In-Reply-To: <1013681614.923.13.camel@klingon>
References: <1013681614.923.13.camel@klingon>

Le Jeudi 14 Février 2002 11:13, Manuel Trujillo a écrit :
> I need to support the japanish language, for example, and I need when a
> make a query to database, with PHP, the results are in japanish.
> Can the database make this directly, or I need to make this via php
> programation, making a php connection with postgres with the appropiate
> arguments?

You need a unicode production chain : database + php apache server. 

A single unicode database can host several languages (Arabic, Traditional 
Chinese, Russian). There is no need to use several charsets. So I assume you 
would prefer a Unicode backend.

1) Creation of a Unicode database
You can use pgAdmin (http://pgadmin.postgresql.org) to create a Unicode 
database. But pgAdmin will not display Unicode information. 

Alternatively, use psql and create a Unicode database with :
CREATE DATABASE foo WITH ENCODING = 'Unicode';

2) Apache + Php
Use Php and Apache as usual. Please note your webpages should:
a) be saved in UTF-8 format. If you need to convert web pages to Unicode, use 
iconv or recode utilities.
b) begin with <meta http-equiv="Content-Type" content="text/html; 
charset=utf-8">. This will tell the browser to switch to Unicode format.
c) Verify that your browser has Japanese fonts installed. Visit Japan Yahoo, 
this should suffice as a test.

Hope this is enough,
Cheers, Jean-Michel POURE



view thread (6+ messages)  latest in thread

Message-ID: <200202141321.g1EDL1L11745@www1.translationforge>
Permalink:  ../200202141321.g1EDL1L11745@www1.translationforge/
Also on:    postgresql.org/message-id/200202141321.g1EDL1L11745@www1.translationforge

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: jm.poure@freesurf.fr, manueltrujillo@dorna.es
  Subject: Re: Locale support
  In-Reply-To: <200202141321.g1EDL1L11745@www1.translationforge>
  References: <1013681614.923.13.camel@klingon> <200202141321.g1EDL1L11745@www1.translationforge>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox