bug=# select * from example_objects where name = 'ÐÐÐÐÐÑ';
object_id | name
-----------+--------
2 | ÐÐÐÐÐÑ
2 | ÐÐÐÐÐÑ
(ÐÐÐÐÑÐÐ: 2)
bug=# select version();
version
---------------------------------------------------------------------------------------------------------------------------------
PostgreSQL 7.4.2 on i386-redhat-linux-gnu, compiled by GCC i386-redhat-linux-gcc
(GCC) 3.3.3 20040216 (Red Hat Linux 3.3.3-2.1)
(1 ÐÐÐÐÑÑ)
Do the following in an installation initdb'd in ru_RU.KOI8-R (It doesn't
happen if you initdb'd with UTF-8). You need to run psql in a locale
that is capable of russian letters, namely an UTF-8 locale, or a KOI8-R
locale. Then:
CREATE DATABASE bug WITH ENCODING='unicode';
\c bug
\i dump.sql
-- here you have to set client_encoding if you chose ru_RU.KOI8-R as the
locale for psql
-- set client_encoding to koi8r;
select * from example_objects where name = 'ÐÐÐÐÐÑ';
dump.sql is attached, the select statement is included in UTF-8.
Let me know if anything is missing.
--
Markus Bertheau <[EMAIL PROTECTED]>
SET client_encoding = 'UNICODE';
CREATE TABLE example_objects (
object_id numeric(20,0) NOT NULL,
name character varying(20)
) WITHOUT OIDS;
COPY example_objects (object_id, name) FROM stdin;
1 root
2 ÐÐÐÐÐÑ
2 ÐÐÐÐÐÑ
\.
\set echo all;
select * from example_objects where name = 'ÐÐÐÐÐÑ';
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster