Re: browser shows garbage instead of UTF-8 characters - Mailing list pgsql-general

From Leif B. Kristensen
Subject Re: browser shows garbage instead of UTF-8 characters
Date
Msg-id 200604131729.49793.leif@solumslekt.org
Whole thread Raw
In response to browser shows garbage instead of UTF-8 characters  ("Sadm sadm" <sadm@bsdmail.com>)
List pgsql-general
On Thursday 13 April 2006 13:12, Sadm sadm wrote:
>Hello!
>I have a PostgreSQL database with UTF-8 encoding. It stores russian
> characters. When I fetch a record from this database and output it to
> the web browser as html page, it looks like a garbage instead of
> normal russian characters. I'm using html with <meta
> http-equiv="Content-Type" content="text/html; charset=utf-8">.
>
>Please help me to find a mistake.
>Thanks in advance.

If you're using PHP, you should issue the command:

pg_set_client_encoding($db, $encoding);

I don't know which value of $encoding you should use with Cyrillic
letters, but I'm using LATIN1 which works fine with Norwegian.
--
Leif Biberg Kristensen | Registered Linux User #338009
http://solumslekt.org/ | Cruising with Gentoo/KDE

pgsql-general by date:

Previous
From: Tony Caduto
Date:
Subject: Re: the integer type
Next
From: "Dave Page"
Date:
Subject: Re: the integer type