Re: another seemingly simple encoding question

Поиск
Список
Период
Сортировка
От kmh496
Тема Re: another seemingly simple encoding question
Дата
Msg-id 1148135856.4318.4.camel@var.sirfsup.com
обсуждение исходный текст
Ответ на another seemingly simple encoding question  (joseph <kmh496@kornet.net>)
Ответы Re: another seemingly simple encoding question  (Tim Allen <tim@proximity.com.au>)
Список pgsql-general
this is a forward of my problem from April.
I have this time gone all the way and re-inited a DB from scratch,
created a new database, documented the import procedure, set the locale
to match but I am still having problems.
For example, look at this match count~
mod=# select count(*) from korean_english;
 count
--------
 205323
(1 row)

mod=#
mod=# select count(*) from korean_english where word='안녕';
 count
-------
 40332
(1 row)

mod=# \set
VERSION = 'PostgreSQL 8.0.0beta3 on i686-pc-linux-gnu, compiled by GCC
gcc (GCC) 3.3.3 20040412 (Red Hat Linux 3.3.3-7)'
AUTOCOMMIT = 'on'
VERBOSITY = 'default'
DBNAME = 'mod'
USER = 'postgres'
PORT = '5432'
ENCODING = 'UNICODE'
PROMPT1 = '%/%R%# '
PROMPT2 = '%/%R%# '
PROMPT3 = '>> '
HISTSIZE = '500'
mod=#

I documented the import procedure and put it at
http://www.myowndictionary.com/design.htm

if there is anybody out there who has any idea, i would be very grateful
for help.   I have to move my database to postgres from mysql, and it
has this big problem with the encoding.

thank you .

joseph.




-------- Forwarded Message --------
보낸 사람: joseph <kmh496@kornet.net>
받는 사람: pgsql-general@postgresql.org
제목: another seemingly simple encoding question
날짜: Fri, 24 Mar 2006 22:27:06 +0900
maybe a routine question here ... .... i hope i can understand the
answer.

[postgres@www ~]$ pg_ctl --version
pg_ctl (PostgreSQL) 8.0.0beta3
[postgres@www ~]$


i have a problem matching a utf8 string with a field in a database
encoded in utf8.
i read the documentation, checked the following, and don't know where i
went astray, trying to match ...
1) i am almost 100% sure the data is correctly utf8. i just dumped and
loaded into postgres.
2)
utf8db -> \l
          List of databases
     Name     |  Owner   | Encoding
--------------+----------+-----------
utf8db         | postgres | UNICODE
3) postgresql.conf

# These settings are initialized by initdb -- they might be changed
lc_messages = 'en_US.utf8'              # locale for system error
message strings
lc_monetary = 'en_US.utf8'              # locale for monetary formatting
lc_numeric = 'en_US.utf8'               # locale for number formatting
lc_time = 'en_US.utf8'                  # locale for time formatting

# - Other Defaults -

4) set client encoding in client (psql or php, either one, both same
mismatch)

LOG:  statement: select wordid,word from korean_english where word='기르
다' limit 10;
LOG:  statement: show client_encoding;
LOG:  statement: set client_encoding to  'utf8';
LOG:  statement: select wordid,word from korean_english where word='기르
다' limit 10;
LOG:  statement: show client_encoding;

5) locale -a | grep en
<snip>
en_US.utf8
</snip>


ohhh,  where is my mistake, please!
--
my site <a href="http://www.myowndictionary.com">myowndictionary</a> was
made to help students of many languages learn them faster.






В списке pgsql-general по дате отправления:

Предыдущее
От: "Ivan Zolotukhin"
Дата:
Сообщение: Re: VACUUM FULL hangs on ordinary table
Следующее
От: "Brendan Jurd"
Дата:
Сообщение: No stddev() for interval?