Re: [NOVICE] Understanding Encoding

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [NOVICE] Understanding Encoding
Дата
Msg-id 14306.1378450769@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [NOVICE] Understanding Encoding  (Beena Emerson <memissemerson@gmail.com>)
Ответы Re: [NOVICE] Understanding Encoding  (Beena Emerson <memissemerson@gmail.com>)
Список pgsql-sql
Beena Emerson <memissemerson@gmail.com> writes:
> It still gives same result:

> $ LANG=ko_KR LC_ALL=ko_KR
> $ psql -d korean

> korean=# SHOW client_encoding;
>  client_encoding
> -----------------
>  EUC_KR
> (1 row)

> korean=# INSERT INTO tbl VALUES ('그레스');
> ERROR:  invalid byte sequence for encoding "EUC_KR": 0xa0 0x88

What you need to figure out is what encoding the text you are typing
is in.  You're telling psql it's EUC_KR but it evidently isn't.
If you're typing these characters manually then it's probably determined
by a setting of the terminal-emulator program you're using.  But if
you're copying-and-pasting then things get more complicated.

Also, what you did above is not what Amit suggested: he wanted you to put
the variable assignments on the same command line as the psql invocation,
so that they'd affect the environment passed to psql.  I'm suspicious of
his solution because I'd have thought the terminal program would set up
the right environment ... but you might as well try it.

            regards, tom lane


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

Предыдущее
От: Beena Emerson
Дата:
Сообщение: Re: [NOVICE] Understanding Encoding
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Understanding Encoding