Re: [NOVICE] Understanding Encoding

Поиск
Список
Период
Сортировка
От Beena Emerson
Тема Re: [NOVICE] Understanding Encoding
Дата
Msg-id CAOG9ApG=wAXN-gvbTQOnMFwnM5ASaG7dLy5UcpSmpHLq1TQH8Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [NOVICE] Understanding Encoding  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
On Fri, Sep 6, 2013 at 12:29 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
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.
 
I tried with both the assignment and invocation in same line. Again it gave the same result.
Maybe the problem is with copy paste. I will look into it.
Thank you.

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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: [NOVICE] Understanding Encoding
Следующее
От: Sebastien FLAESCH
Дата:
Сообщение: Re: Understanding Encoding