pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: Beena Emerson <memissemerson@gmail.com>
Cc: Amit Langote <amitlangote09@gmail.com>
Cc: pgsql-sql@postgresql.org, "pgsql-novice@postgresql.org" <pgsql-novice@postgresql.org>
Subject: Re: [SQL] Understanding Encoding
Date: Fri, 06 Sep 2013 02:59:29 -0400
Message-ID: <14306.1378450769@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOG9ApEYnOc2RT_v040_paC3rm2riy=0xaVZED54KTs8dbv0fQ@mail.gmail.com>
References: <CAOG9ApGQ3s5g3Okm3xAmsUWXnUiD8gt+-5taz=YKdJGPm4TFsg@mail.gmail.com>
<CA+HiwqFcc5YDnKnsVxhTemKsG0ytynPBUn6+qT9bWvjQoEZRpA@mail.gmail.com>
<CAOG9ApEYnOc2RT_v040_paC3rm2riy=0xaVZED54KTs8dbv0fQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-novice>
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
--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
view thread (10+ messages) latest in thread
Message-ID: <14306.1378450769@sss.pgh.pa.us>
Permalink: ../14306.1378450769@sss.pgh.pa.us/
Also on: postgresql.org/message-id/14306.1378450769@sss.pgh.pa.us
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, memissemerson@gmail.com, amitlangote09@gmail.com, pgsql-novice@postgresql.org
Subject: Re: [SQL] Understanding Encoding
In-Reply-To: <14306.1378450769@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox