From: | Peter Geoghegan <pg(at)heroku(dot)com> |
---|---|
To: | "ciifrancesco(at)tiscali(dot)it" <ciifrancesco(at)tiscali(dot)it> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql-zh-general(at)postgresql(dot)org, pgsql-ru-general(at)postgresql(dot)org |
Subject: | Re: [HACKERS] Chinese in Postgres |
Date: | 2013-08-17 18:15:03 |
Message-ID: | CAM3SWZTv8Zn7EUuQfV9p19a_5pDD+u4+0FiSzLmcTmRy0LNgPw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-ru-general pgsql-zh-general |
On Fri, Aug 16, 2013 at 4:25 AM, ciifrancesco(at)tiscali(dot)it
<ciifrancesco(at)tiscali(dot)it> wrote:
> If I insert the data using a C++ program I have empty squares, in this
> format: ��� (3 empty squares for each chinese ideogram as that is the length
> in utf-8)
> If the string contains chinese mixed with ASCII, the ASCII is OK but the
> Chinese is broken:
> 漢語1-3漢語 --> ������1-3������
You mentioned nothing about what platform this is or how you've built
the program, and nothing about operating system locale.
If this is a Windows program (you mention PuTTY), I'd read up on
differences between what are known as "Unicode" and "Multibyte"
encodings on MSDN:
http://msdn.microsoft.com/en-us/library/2dax2h36.aspx
Of course, this is a total stab in the dark, but then people with the
problem that you describe don't tend to be on *nix systems as a rule.
As someone said upthread, if Postgres does that then it's because the
bytes you sent aren't what you think the are when rendered as utf-8.
--
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2013-08-17 19:33:46 | Re: Fix Windows socket error checking for MinGW |
Previous Message | Andrew Dunstan | 2013-08-17 18:04:24 | Re: Fix Windows socket error checking for MinGW |
From | Date | Subject | |
---|---|---|---|
Next Message | Nicolas Barbier | 2013-08-18 08:22:00 | Re: Chinese in Postgres |
Previous Message | Huang Bambo | 2013-08-17 11:16:21 | Re: [pgsql-zh-general] Chinese in Postgres |
From | Date | Subject | |
---|---|---|---|
Next Message | Nicolas Barbier | 2013-08-18 08:22:00 | Re: Chinese in Postgres |
Previous Message | Huang Bambo | 2013-08-17 11:16:21 | Re: [pgsql-zh-general] Chinese in Postgres |