UTF-8 encoding failure

From: Martin Schäfer <Martin(dot)Schaefer(at)cadcorp(dot)com>
To: "'pgsql-bugs(at)postgresql(dot)org'" <pgsql-bugs(at)postgresql(dot)org>
Subject: UTF-8 encoding failure
Date: 2010-03-25 11:27:30
Message-ID: 11A8567A97B15648846060F5CD818EB840FF19F7E9@DEV001EX.Dev.cadcorp.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

Is this the right place to report bugs?

The attached program creates a table with Japanese column names. When the column names are retrieved in a query using PQfname, and invalid string is returned. The invalid column names can also be seen in PGAdmin III. This only seems to happen with one (or more?) specific Japanese character.

Operating System: Windows Vista Ultimate SP2 32bit
PostgreSQL server versions: 8.4.2 and 8.3.3 both fail
libpq version: 8.3.6
Database encoding: UTF8
Client encoding:
- UTF8: does not return the same column name used to create the table.
- SJIS: "select * from table" fails with error:
ERROR: invalid byte sequence for encoding "UTF8": 0xe59eff
HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".

From what I can see the character in question has the following encodings:
SJIS: 8c b4
UTF-16: 9f 53
UTF-8: e5 8e 9f

Any chance this problem could be fixed soon?

Bye,

Martin Schäfer
Principal Software Engineer
Cadcorp
Computer Aided Development Corporation Ltd.
1 Heathcock Court, London, WC2R 0NT
martin(dot)schaefer(at)cadcorp(dot)com
www.cadcorp.com
****************************************************************************
This email is confidential and may be privileged and should not be used, read
or copied by anyone who is not the original intended recipient. If you have
received this email in error please inform the sender and delete it from
your mailbox or any other storage mechanism. Unless specifically stated,
nothing in this email constitutes an offer by Cadcorp and Cadcorp does not
warrant that any information contained in this email is accurate.
Cadcorp cannot accept liability for any statements made which are clearly the
sender's own and not expressly made on behalf of Cadcorp or one of its agents.
Please rely on your own virus check. No responsibility is taken by Cadcorp
for any damage arising out of any bug or virus infection.
****************************************************************************

Attachment Content-Type Size
TestPostgreSQLJapanese.cpp text/plain 6.8 KB

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message ALCALDIA DE INFANTE ALCALDIA DE INFANTE 2010-03-25 14:51:31 Question about installation in 2003 server
Previous Message Tom Lane 2010-03-24 16:44:08 Re: BUG #5386: HBA rejection error message incorrect