From: | John R Pierce <pierce(at)hogranch(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Re: Reading £ character from DB is displaying œ character |
Date: | 2013-09-24 03:06:03 |
Message-ID: | 5241019B.7090008@hogranch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On 9/23/2013 5:27 PM, saisantoshi wrote:
> Not sure what the client_encoding and server_encoding does here?
the server encoding gives the character encoding that the data is stored
in. the client encoding specifies the encoding used for user
input/output, so user data in SQL commands will be converted from
client_encoding to server_encoding when its written, and coverted back
to the current client_encoding when read.
if you're running psql in a windows command shell, try setting the
client_encoding to DOS437 or CP437 (I'm not sure what the correct
notation is for this) and do your SELECT ...
Java itself uses UCS2/UTF16 internally, so I don't know what the right
way of displaying text from a java program, it proably depends on
whether you're displaying it on a text mode "DOS" window, or in a GUI
window, or on a html page.
--
john r pierce 37N 122W
somewhere on the middle of the left coast
From | Date | Subject | |
---|---|---|---|
Next Message | saisantoshi | 2013-09-24 04:52:23 | Re: Reading £ character from DB is displaying œ character |
Previous Message | saisantoshi | 2013-09-24 00:27:37 | Re: Reading £ character from DB is displaying œ character |