Japanese characters problem - Mailing list pgsql-general

From Grzegorz Przeździecki
Subject Japanese characters problem
Date
Msg-id 200503181734.17963.Grzegorz.Przezdziecki@PolskieSklepy.pl
Whole thread Raw
List pgsql-general
Welcome
Make some database and have problem with japanese characters maybe with other
too
Below some example

Linux system it is fedora (RH)
Locale for postgresql i pl_PL.utf8
Database is in uniqode

Thanks for help.

======================================================

[root@maciekb 1.0.4]# rpm -q postgresql
postgresql-7.4.7-3.FC3.1
[root@maciekb 1.0.4]# rpm -q postgresql-server
postgresql-server-7.4.7-3.FC3.1



crm=# select title,category from contentinfo ;
             title              | category
--------------------------------+----------
 h264-charlie-900-hdd.avi       | 洋画
 h264-liloo-900-hdd.avi - drugi | 邦画
(2 rows)

crm=# select title,category from contentinfo where category='邦洋';
             title              | category
--------------------------------+----------
 h264-charlie-900-hdd.avi       | 洋画
 h264-liloo-900-hdd.avi - drugi | 邦画
(2 rows)

crm=# select title,category from contentinfo where category='画洋';
             title              | category
--------------------------------+----------
 h264-charlie-900-hdd.avi       | 洋画
 h264-liloo-900-hdd.avi - drugi | 邦画
(2 rows)

crm=# select title,category from contentinfo where category='洋';
 title | category
-------+----------
(0 rows)

crm=# select title,category from contentinfo where category='画画';
             title              | category
--------------------------------+----------
 h264-charlie-900-hdd.avi       | 洋画
 h264-liloo-900-hdd.avi - drugi | 邦画
(2 rows)

crm=# select title,category from contentinfo where category='画画画';
 title | category
-------+----------
(0 rows)

crm=# select title,category from contentinfo where category ilike '画画';
 title | category
-------+----------
(0 rows)

crm=# select title,category from contentinfo where category ilike '洋画';
          title           | category
--------------------------+----------
 h264-charlie-900-hdd.avi | 洋画
(1 row)

crm=# select title,category from contentinfo where category ilike '邦画';
             title              | category
--------------------------------+----------
 h264-liloo-900-hdd.avi - drugi | 邦画
(1 row)

crm=# select title,category from contentinfo where category ilike '邦画';
             title              | category
--------------------------------+----------
 h264-liloo-900-hdd.avi - drugi | 邦画
(1 row)

crm=# \l
       List of databases
   Name    | Owner | Encoding
-----------+-------+-----------
 crm       | sv    | UNICODE
 template0 | sv    | SQL_ASCII
 template1 | sv    | SQL_ASCII

(3 rows)

crm=# select title,category from contentinfo where category ilike '%邦
画%';
             title              | category
--------------------------------+----------
 h264-liloo-900-hdd.avi - drugi | 邦画
(1 row)

crm=# select title,category from contentinfo where category like '邦画';
             title              | category
--------------------------------+----------
 h264-liloo-900-hdd.avi - drugi | 邦画
(1 row)


--
Grzegorz Przeździecki
www.PolskieSklepy.pl
kom. +48.606.822.506
gg:3701851 skype: grzegorz.przezdziecki

pgsql-general by date:

Previous
From: "Rick Schumeyer"
Date:
Subject: performance: pg vs pg!
Next
From: Marco Colombo
Date:
Subject: Re: plpython function problem workaround