pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Leif B. Kristensen <leif@solumslekt.org>
To: pgsql-general@postgresql.org
Subject: Re: browser shows garbage instead of UTF-8 characters
Date: Thu, 13 Apr 2006 17:29:49 +0200
Message-ID: <200604131729.49793.leif@solumslekt.org> (raw)
In-Reply-To: <20060413111242.27E6ACA0A4@ws5-11.us4.outblaze.com>
References: <20060413111242.27E6ACA0A4@ws5-11.us4.outblaze.com>

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



view thread (3+ messages)

Message-ID: <200604131729.49793.leif@solumslekt.org>
Permalink:  ../200604131729.49793.leif@solumslekt.org/
Also on:    postgresql.org/message-id/200604131729.49793.leif@solumslekt.org

 · 

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-jdbc@postgresql.org
  Cc: leif@solumslekt.org, pgsql-general@postgresql.org
  Subject: Re: browser shows garbage instead of UTF-8 characters
  In-Reply-To: <200604131729.49793.leif@solumslekt.org>
  References: <20060413111242.27E6ACA0A4@ws5-11.us4.outblaze.com> <200604131729.49793.leif@solumslekt.org>

* 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