X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id 6D75E11F6691 for ; Thu, 13 Apr 2006 12:30:04 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.599 X-Spam-Level: X-Spam-Status: No, score=-2.599 required=5 tests=[BAYES_00=-2.599] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id J0btVbCsbCW4 for ; Thu, 13 Apr 2006 12:29:55 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail43.e.nsc.no (mail43.e.nsc.no [193.213.115.43]) by postgresql.org (Postfix) with ESMTP id 6464E11F65B3 for ; Thu, 13 Apr 2006 12:29:53 -0300 (ADT) Received: from [192.168.0.57] (062016183238.customer.alfanett.no [62.16.183.238]) (authenticated bits=0) by mail43.nsc.no (8.13.6/8.13.5) with ESMTP id k3DFToBA009948 for ; Thu, 13 Apr 2006 17:29:51 +0200 (CEST) From: "Leif B. Kristensen" To: pgsql-general@postgresql.org Subject: Re: browser shows garbage instead of UTF-8 characters Date: Thu, 13 Apr 2006 17:29:49 +0200 User-Agent: KMail/1.8.3 References: <20060413111242.27E6ACA0A4@ws5-11.us4.outblaze.com> In-Reply-To: <20060413111242.27E6ACA0A4@ws5-11.us4.outblaze.com> X-Face: %iea8o"[SI'kMDS.`hz7lU=?\^lC9J-]CVjo; f{4-C:$?uVUEjyN~uYFn%*aH_c3d09U>=?utf-8?q?x=0A=09TXtaoj=7EMV=2E8PgG7hik9=3BcCT2N6+u?=@Y{wH\p3*_f~FH9k,Wi74e[_l%.7b^'zJ)8S'^G<(=?utf-8?q?=3D=0A=09zw8=5CPMC3=27=7BKl9=2EzL*ks!b6wA?=,c~'F`k&Vq|ELDGa|4 X-Archive-Number: 200604/652 X-Sequence-Number: 94093 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 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