Re: UTF-8 encoding failure

Lists: pgsql-bugs
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
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

From: "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
To: Martin Schäfer <Martin(dot)Schaefer(at)cadcorp(dot)com>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: UTF-8 encoding failure
Date: 2010-03-25 16:23:30
Message-ID: 1FEF339CC919403C97DE3E4C36D23906@acer08f817a9b5
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Hi Martin-san.

Probably it is not a bug.
Does this help you?
Please see.

C:\home\HIROSHI>cl TestPostgreSQLJapanese.cpp -I"C:\Program Files\PostgreSQL\8.4
\include" "C:\Program Files\PostgreSQL\8.4\lib\libpq.lib"
Microsoft(R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

TestPostgreSQLJapanese.cpp
WINVER not defined. Defaulting to 0x0600 (Windows Vista)
c:\Program Files\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE\afxwin1.inl(105)
: warning C4530: C++ 例外処理を使っていますが、アンワインド セマンティクスは有効
にはなりません。/EHsc を指定してください。
Microsoft (R) Incremental Linker Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.

/out:TestPostgreSQLJapanese.exe
TestPostgreSQLJapanese.obj
"C:\Program Files\PostgreSQL\8.4\lib\libpq.lib"

C:\home\HIROSHI>set Path=%Path%;C:\Program Files\PostgreSQL\8.4\bin;

C:\home\HIROSHI>TestPostgreSQLJapanese.exe
Testing with encoding UTF-8:
NOTICE: CREATE TABLE will create implicit sequence "蝗帛ョ誉gid_seq" for serial
column "蝗帛ョ・gid"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "蝗帛ョ誉pkey" for
table "蝗帛ョ・

Testing with encoding SJIS:
NOTICE: CREATE TABLE will create implicit sequence "四宗_gid_seq" for serial co
lumn "四宗.gid"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "四宗_pkey" for t
able "四宗"

Press any key to exit.

Regards,
Hiroshi Saito

----- Original Message -----
From: "Martin Schäfer" <Martin(dot)Schaefer(at)cadcorp(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Sent: Thursday, March 25, 2010 8:27 PM
Subject: [BUGS] UTF-8 encoding failure

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.
****************************************************************************

--------------------------------------------------------------------------------

>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>

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

From: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Martin Schafer <Martin(dot)Schaefer(at)cadcorp(dot)com>, "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: UTF-8 encoding failure
Date: 2010-03-26 02:06:48
Message-ID: 20100326110648.9F68.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

"Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp> wrote:
> Probably it is not a bug.
>
> Testing with encoding UTF-8:
> NOTICE: CREATE TABLE will create implicit sequence "蝗帛ョ誉gid_seq" for serial column "蝗帛ョ・gid"
> Testing with encoding SJIS:
> NOTICE: CREATE TABLE will create implicit sequence "四宗_gid_seq" for serial column "四宗.gid"

> From: "Martin Schafer" <Martin(dot)Schaefer(at)cadcorp(dot)com>
> - UTF8: does not return the same column name used to create the table.

Yeah, there are no encoding problems in libpq and postgres, but you need
to print NOTICE messages in the same codepage with your console.
You probably need to replace routines to display NOTICE messages in libpq.
PQsetNoticeReceiver() would be a help.

Or, you could just change the codepage of your console to UTF-8.
However, there is a known problem in Windows console that console with
UTF-8 codepage cannot display any kanji characters. I'm not sure
what we can do to fix it ... some font settings in the registory?

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center


From: Martin Schäfer <Martin(dot)Schaefer(at)cadcorp(dot)com>
To: 'Takahiro Itagaki' <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Hiroshi Saito <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: UTF-8 encoding failure
Date: 2010-03-26 08:43:59
Message-ID: 11A8567A97B15648846060F5CD818EB840FF19F7EA@DEV001EX.Dev.cadcorp.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Unfortunately there are encoding problems on my machine. I'm getting this output:

Testing with encoding UTF-8:
PQfname(pResult, 4) returned incorrect field name.
PQfname(pResult, 5) returned incorrect field name.
PQfname(pResult, 6) returned incorrect field name.

Testing with encoding SJIS:
Query failed 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".

Instead of a Japanese OS, I used an English (UK) OS and set the system locale to Japanese, but that should be good enough I think.
I also used a new install of PostgreSQL, with only the PostGIS module added.

Okay, I find it difficult to imagine that a bug like this would not have been found before. But if it works fine on your machines, why doesn't it work on my machine?

Regards,

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

> -----Original Message-----
> From: Takahiro Itagaki [mailto:itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp]
> Sent: Friday, March 26, 2010 3:07 AM
> To: Martin Schäfer; Hiroshi Saito
> Cc: pgsql-bugs(at)postgresql(dot)org
> Subject: Re: [BUGS] UTF-8 encoding failure
>
> "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp> wrote:
> > Probably it is not a bug.
> >
> > Testing with encoding UTF-8:
> > NOTICE: CREATE TABLE will create implicit sequence
> "蝗帛ョ誉gid_seq" for serial column "蝗帛ョ・gid"
> > Testing with encoding SJIS:
> > NOTICE: CREATE TABLE will create implicit sequence
> "四宗_gid_seq" for serial column "四宗.gid"
>
> > From: "Martin Schafer" <Martin(dot)Schaefer(at)cadcorp(dot)com>
> > - UTF8: does not return the same column name used to create
> the table.
>
> Yeah, there are no encoding problems in libpq and postgres,
> but you need to print NOTICE messages in the same codepage
> with your console.
> You probably need to replace routines to display NOTICE
> messages in libpq.
> PQsetNoticeReceiver() would be a help.
>
> Or, you could just change the codepage of your console to UTF-8.
> However, there is a known problem in Windows console that console with
> UTF-8 codepage cannot display any kanji characters. I'm not
> sure what we can do to fix it ... some font settings in the registory?
>
> Regards,
> ---
> Takahiro Itagaki
> NTT Open Source Software Center
>
>
>
>
****************************************************************************
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.
****************************************************************************


From: "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
To: Martin Schäfer <Martin(dot)Schaefer(at)cadcorp(dot)com>, "'Takahiro Itagaki'" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: UTF-8 encoding failure
Date: 2010-03-26 13:57:58
Message-ID: DDA13DC46C09430C8F2703CB4ADE01E9@acer08f817a9b5
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Hi Martin-san.

Umm, I sent what corrected some of your TestPostgreSQLJapanese.cpp.
http://archives.postgresql.org/pgsql-bugs/2010-03/msg00188.php
Did you use it?

Regards,
Hiroshi Saito

----- Original Message -----
From: "Martin Schäfer" <Martin(dot)Schaefer(at)cadcorp(dot)com>

> Unfortunately there are encoding problems on my machine. I'm getting this output:
>
> Testing with encoding UTF-8:
> PQfname(pResult, 4) returned incorrect field name.
> PQfname(pResult, 5) returned incorrect field name.
> PQfname(pResult, 6) returned incorrect field name.
>
> Testing with encoding SJIS:
> Query failed 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".
>
> Instead of a Japanese OS, I used an English (UK) OS and set the system locale to Japanese,
> but that should be good enough I think.
> I also used a new install of PostgreSQL, with only the PostGIS module added.
>
> Okay, I find it difficult to imagine that a bug like this would not have been found
> before. But if it works fine on your machines, why doesn't it work on my machine?
>
> Regards,
>
> 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
>
>> -----Original Message-----
>> From: Takahiro Itagaki [mailto:itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp]
>> Sent: Friday, March 26, 2010 3:07 AM
>> To: Martin Schäfer; Hiroshi Saito
>> Cc: pgsql-bugs(at)postgresql(dot)org
>> Subject: Re: [BUGS] UTF-8 encoding failure
>>
>> "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp> wrote:
>> > Probably it is not a bug.
>> >
>> > Testing with encoding UTF-8:
>> > NOTICE: CREATE TABLE will create implicit sequence
>> "蝗帛ョ誉gid_seq" for serial column "蝗帛ョ・gid"
>> > Testing with encoding SJIS:
>> > NOTICE: CREATE TABLE will create implicit sequence
>> "四宗_gid_seq" for serial column "四宗.gid"
>>
>> > From: "Martin Schafer" <Martin(dot)Schaefer(at)cadcorp(dot)com>
>> > - UTF8: does not return the same column name used to create
>> the table.
>>
>> Yeah, there are no encoding problems in libpq and postgres,
>> but you need to print NOTICE messages in the same codepage
>> with your console.
>> You probably need to replace routines to display NOTICE
>> messages in libpq.
>> PQsetNoticeReceiver() would be a help.
>>
>> Or, you could just change the codepage of your console to UTF-8.
>> However, there is a known problem in Windows console that console with
>> UTF-8 codepage cannot display any kanji characters. I'm not
>> sure what we can do to fix it ... some font settings in the registory?
>>
>> Regards,
>> ---
>> Takahiro Itagaki
>> NTT Open Source Software Center
>>
>>
>>
>>


From: Martin Schäfer <Martin(dot)Schaefer(at)cadcorp(dot)com>
To: 'Hiroshi Saito' <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>, 'Takahiro Itagaki' <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: UTF-8 encoding failure
Date: 2010-03-26 14:21:21
Message-ID: 11A8567A97B15648846060F5CD818EB840FF19F7EB@DEV001EX.Dev.cadcorp.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Hello Hiroshi-san,

The only differences I found between my source file and yours are the file encoding (Unicode/SJIS), different #include-s and different parameters to PQsetdblogin. I had to undo the last two changes to compile and run on my machine. And the changed file encoding made no difference. It still fails on my machine.

Regards,

Martin

> -----Original Message-----
> From: Hiroshi Saito [mailto:z-saito(at)guitar(dot)ocn(dot)ne(dot)jp]
> Sent: Friday, March 26, 2010 2:58 PM
> To: Martin Schäfer; 'Takahiro Itagaki'
> Cc: pgsql-bugs(at)postgresql(dot)org
> Subject: Re: [BUGS] UTF-8 encoding failure
>
> Hi Martin-san.
>
> Umm, I sent what corrected some of your TestPostgreSQLJapanese.cpp.
> http://archives.postgresql.org/pgsql-bugs/2010-03/msg00188.php
> Did you use it?
>
> Regards,
> Hiroshi Saito
>
> ----- Original Message -----
> From: "Martin Schäfer" <Martin(dot)Schaefer(at)cadcorp(dot)com>
>
>
> > Unfortunately there are encoding problems on my machine.
> I'm getting this output:
> >
> > Testing with encoding UTF-8:
> > PQfname(pResult, 4) returned incorrect field name.
> > PQfname(pResult, 5) returned incorrect field name.
> > PQfname(pResult, 6) returned incorrect field name.
> >
> > Testing with encoding SJIS:
> > Query failed 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".
> >
> > Instead of a Japanese OS, I used an English (UK) OS and set
> the system locale to Japanese,
> > but that should be good enough I think.
> > I also used a new install of PostgreSQL, with only the
> PostGIS module added.
> >
> > Okay, I find it difficult to imagine that a bug like this
> would not have been found
> > before. But if it works fine on your machines, why doesn't
> it work on my machine?
> >
> > Regards,
> >
> > 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
> >
> >> -----Original Message-----
> >> From: Takahiro Itagaki [mailto:itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp]
> >> Sent: Friday, March 26, 2010 3:07 AM
> >> To: Martin Schäfer; Hiroshi Saito
> >> Cc: pgsql-bugs(at)postgresql(dot)org
> >> Subject: Re: [BUGS] UTF-8 encoding failure
> >>
> >> "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp> wrote:
> >> > Probably it is not a bug.
> >> >
> >> > Testing with encoding UTF-8:
> >> > NOTICE: CREATE TABLE will create implicit sequence
> >> "蝗帛ョ誉gid_seq" for serial column "蝗帛ョ・gid"
> >> > Testing with encoding SJIS:
> >> > NOTICE: CREATE TABLE will create implicit sequence
> >> "四宗_gid_seq" for serial column "四宗.gid"
> >>
> >> > From: "Martin Schafer" <Martin(dot)Schaefer(at)cadcorp(dot)com>
> >> > - UTF8: does not return the same column name used to create
> >> the table.
> >>
> >> Yeah, there are no encoding problems in libpq and postgres,
> >> but you need to print NOTICE messages in the same codepage
> >> with your console.
> >> You probably need to replace routines to display NOTICE
> >> messages in libpq.
> >> PQsetNoticeReceiver() would be a help.
> >>
> >> Or, you could just change the codepage of your console to UTF-8.
> >> However, there is a known problem in Windows console that
> console with
> >> UTF-8 codepage cannot display any kanji characters. I'm not
> >> sure what we can do to fix it ... some font settings in
> the registory?
> >>
> >> Regards,
> >> ---
> >> Takahiro Itagaki
> >> NTT Open Source Software Center
> >>
> >>
> >>
> >>
>
>
****************************************************************************
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.
****************************************************************************


From: "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
To: Martin Schäfer <Martin(dot)Schaefer(at)cadcorp(dot)com>, "'Takahiro Itagaki'" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: UTF-8 encoding failure
Date: 2010-03-26 14:35:30
Message-ID: ECCCA4487C8542618EAB90A5783236DC@acer08f817a9b5
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Hi.

Ahh ok, Would you try this.

C:\home\HIROSHI>"C:\Program Files\PostgreSQL\8.4\bin\psql.exe" -f SJIS_TEST.SQL
-p5433 postgres postgres
データベ
ース一覧
\x96\xBC\x91O | \x8F\x8A\x97L\x8E | \x83G\x83\x93\x83R\x81[\x83f\x83B\x83\x93\x
83O | \x8Fニ構x87\x8F\x87\x8F\x98 | Ctype(\x95マ浬xB7\x89\x89\x8EZ\x8Eq) | \x83A\x
83N\x83Z\x83X\x8C\xA0
---------------+-------------------+--------------------------------------------
----+---------------------------+------------------------------------+----------
--------------------
postgres | postgres | UTF8
| C | C |
template0 | postgres | UTF8
| C | C | =c/postgr
es

: postgres=
CTc/postgres
template1 | postgres | UTF8
| C | C | =c/postgr
es

: postgres=
CTc/postgres
(3 行)

UTF8
SJIS
psql:SJIS_TEST.SQL:5: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit i
ndex "漢字テーブル_pkey" for table "漢字テーブル"
CREATE TABLE
INSERT 0 1
INSERT 0 1
へんかん | どうですか
------------+------------
さいとう | ひろし
こんにちは | ひろしです
(2 行)

DROP TABLE

----- Original Message -----
From: "Martin Schäfer" <Martin(dot)Schaefer(at)cadcorp(dot)com>

> Hello Hiroshi-san,
>
> The only differences I found between my source file and yours are the file encoding
> (Unicode/SJIS), different #include-s and different parameters to PQsetdblogin. I had to
> undo the last two changes to compile and run on my machine. And the changed file encoding
> made no difference. It still fails on my machine.
>
> Regards,
>
> Martin

Attachment Content-Type Size
SJIS_TEST.SQL application/octet-stream 313 bytes

From: Martin Schäfer <Martin(dot)Schaefer(at)cadcorp(dot)com>
To: 'Hiroshi Saito' <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>, 'Takahiro Itagaki' <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: UTF-8 encoding failure
Date: 2010-03-26 14:49:15
Message-ID: 11A8567A97B15648846060F5CD818EB840FF19F7EC@DEV001EX.Dev.cadcorp.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Hi,

This worked fine, as you can see in the attached result. However, I can see that my database has a different locale (English_United Kingdom.1252) from yours (C). Can this cause the problem?

Regards,

Martin

> -----Original Message-----
> From: Hiroshi Saito [mailto:z-saito(at)guitar(dot)ocn(dot)ne(dot)jp]
> Sent: Friday, March 26, 2010 3:36 PM
> To: Martin Schäfer; 'Takahiro Itagaki'
> Cc: pgsql-bugs(at)postgresql(dot)org
> Subject: Re: [BUGS] UTF-8 encoding failure
>
> Hi.
>
> Ahh ok, Would you try this.
>
> C:\home\HIROSHI>"C:\Program
> Files\PostgreSQL\8.4\bin\psql.exe" -f SJIS_TEST.SQL
> -p5433 postgres postgres
>
> データベ
> ース一覧
> \x96\xBC\x91O | \x8F\x8A\x97L\x8E |
> \x83G\x83\x93\x83R\x81[\x83f\x83B\x83\x93\x
> 83O | \x8Fニ構x87\x8F\x87\x8F\x98 |
> Ctype(\x95マ浬xB7\x89\x89\x8EZ\x8Eq) | \x83A\x 83N\x83Z\x83X\x8C\xA0
> ---------------+-------------------+--------------------------
> ----------
> ---------------+-------------------+--------
> ----+---------------------------+-----------------------------
> -------+--
> ----+---------------------------+-----------------------------
> -------+--
> ----+---------------------------+-----------------------------
> -------+--
> ----+---------------------------+-----------------------------
> -------+--
> ----+---------------------------+-----------------------------
> -------+--
> --------------------
> postgres | postgres | UTF8
> | C | C |
> template0 | postgres | UTF8
> | C | C
> | =c/postgr
> es
>
>
> : postgres= CTc/postgres
> template1 | postgres | UTF8
> | C | C
> | =c/postgr
> es
>
>
> : postgres= CTc/postgres
> (3 行)
>
>
> UTF8
> SJIS
> psql:SJIS_TEST.SQL:5: NOTICE: CREATE TABLE / PRIMARY KEY
> will create implicit i ndex "漢字テーブル_pkey" for table "漢字テーブル"
> CREATE TABLE
> INSERT 0 1
> INSERT 0 1
> へんかん | どうですか
> ------------+------------
> さいとう | ひろし
> こんにちは | ひろしです
> (2 行)
>
>
> DROP TABLE
>
> ----- Original Message -----
> From: "Martin Schäfer" <Martin(dot)Schaefer(at)cadcorp(dot)com>
>
>
> > Hello Hiroshi-san,
> >
> > The only differences I found between my source file and
> yours are the file encoding
> > (Unicode/SJIS), different #include-s and different
> parameters to PQsetdblogin. I had to
> > undo the last two changes to compile and run on my machine.
> And the changed file encoding
> > made no difference. It still fails on my machine.
> >
> > Regards,
> >
> > Martin
>
****************************************************************************
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
SJIS_TEST_RESULT.txt text/plain 1.9 KB

From: "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
To: Martin Schäfer <Martin(dot)Schaefer(at)cadcorp(dot)com>, "'Takahiro Itagaki'" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: UTF-8 encoding failure
Date: 2010-03-26 15:35:13
Message-ID: F44DD54F162B41B6A8E8F85275F4AD21@acer08f817a9b5
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Hi.

I think that the locale is not desirable. However, It is not related to this problem.
Can you test without editing this program?
http://winpg.jp/~saito/PGSQL_SJIS/
I think that it passes.

Regards,
Hiroshi Saito

----- Original Message -----
From: "Martin Schäfer" <Martin(dot)Schaefer(at)cadcorp(dot)com>
To: "'Hiroshi Saito'" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>; "'Takahiro Itagaki'"
<itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Sent: Friday, March 26, 2010 11:49 PM
Subject: Re: [BUGS] UTF-8 encoding failure

> Hi,
>
> This worked fine, as you can see in the attached result. However, I can see that my
> database has a different locale (English_United Kingdom.1252) from yours (C). Can this
> cause the problem?
>
> Regards,
>
> Martin
>
>> -----Original Message-----
>> From: Hiroshi Saito [mailto:z-saito(at)guitar(dot)ocn(dot)ne(dot)jp]
>> Sent: Friday, March 26, 2010 3:36 PM
>> To: Martin Schäfer; 'Takahiro Itagaki'
>> Cc: pgsql-bugs(at)postgresql(dot)org
>> Subject: Re: [BUGS] UTF-8 encoding failure
>>
>> Hi.
>>
>> Ahh ok, Would you try this.
>>
>> C:\home\HIROSHI>"C:\Program
>> Files\PostgreSQL\8.4\bin\psql.exe" -f SJIS_TEST.SQL
>> -p5433 postgres postgres
>>
>> データベ
>> ース一覧
>> \x96\xBC\x91O | \x8F\x8A\x97L\x8E |
>> \x83G\x83\x93\x83R\x81[\x83f\x83B\x83\x93\x
>> 83O | \x8Fニ構x87\x8F\x87\x8F\x98 |
>> Ctype(\x95マ浬xB7\x89\x89\x8EZ\x8Eq) | \x83A\x 83N\x83Z\x83X\x8C\xA0
>> ---------------+-------------------+--------------------------
>> ----------
>> ---------------+-------------------+--------
>> ----+---------------------------+-----------------------------
>> -------+--
>> ----+---------------------------+-----------------------------
>> -------+--
>> ----+---------------------------+-----------------------------
>> -------+--
>> ----+---------------------------+-----------------------------
>> -------+--
>> ----+---------------------------+-----------------------------
>> -------+--
>> --------------------
>> postgres | postgres | UTF8
>> | C | C |
>> template0 | postgres | UTF8
>> | C | C
>> | =c/postgr
>> es
>>
>>
>> : postgres= CTc/postgres
>> template1 | postgres | UTF8
>> | C | C
>> | =c/postgr
>> es
>>
>>
>> : postgres= CTc/postgres
>> (3 行)
>>
>>
>> UTF8
>> SJIS
>> psql:SJIS_TEST.SQL:5: NOTICE: CREATE TABLE / PRIMARY KEY
>> will create implicit i ndex "漢字テーブル_pkey" for table "漢字テーブル"
>> CREATE TABLE
>> INSERT 0 1
>> INSERT 0 1
>> へんかん | どうですか
>> ------------+------------
>> さいとう | ひろし
>> こんにちは | ひろしです
>> (2 行)
>>
>>
>> DROP TABLE
>>
>> ----- Original Message -----
>> From: "Martin Schäfer" <Martin(dot)Schaefer(at)cadcorp(dot)com>
>>
>>
>> > Hello Hiroshi-san,
>> >
>> > The only differences I found between my source file and
>> yours are the file encoding
>> > (Unicode/SJIS), different #include-s and different
>> parameters to PQsetdblogin. I had to
>> > undo the last two changes to compile and run on my machine.
>> And the changed file encoding
>> > made no difference. It still fails on my machine.
>> >
>> > Regards,
>> >
>> > Martin
>>
> ****************************************************************************
> 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.
> ****************************************************************************
>

--------------------------------------------------------------------------------

>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>


From: Martin Schäfer <Martin(dot)Schaefer(at)cadcorp(dot)com>
To: 'Hiroshi Saito' <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>, 'Takahiro Itagaki' <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: UTF-8 encoding failure
Date: 2010-03-26 15:46:08
Message-ID: 11A8567A97B15648846060F5CD818EB840FF19F7ED@DEV001EX.Dev.cadcorp.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Can you copy libpq.dll to the same destination please? I linked libpq as a static library into my project.

Martin

> -----Original Message-----
> From: Hiroshi Saito [mailto:z-saito(at)guitar(dot)ocn(dot)ne(dot)jp]
> Sent: Friday, March 26, 2010 4:35 PM
> To: Martin Schäfer; 'Takahiro Itagaki'
> Cc: pgsql-bugs(at)postgresql(dot)org
> Subject: Re: [BUGS] UTF-8 encoding failure
>
> Hi.
>
> I think that the locale is not desirable. However, It is not
> related to this problem.
> Can you test without editing this program?
> http://winpg.jp/~saito/PGSQL_SJIS/
> I think that it passes.
>
> Regards,
> Hiroshi Saito
>
> ----- Original Message -----
> From: "Martin Schäfer" <Martin(dot)Schaefer(at)cadcorp(dot)com>
> To: "'Hiroshi Saito'" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>; "'Takahiro
> Itagaki'"
> <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
> Cc: <pgsql-bugs(at)postgresql(dot)org>
> Sent: Friday, March 26, 2010 11:49 PM
> Subject: Re: [BUGS] UTF-8 encoding failure
>
>
> > Hi,
> >
> > This worked fine, as you can see in the attached result.
> However, I can see that my
> > database has a different locale (English_United
> Kingdom.1252) from yours (C). Can this
> > cause the problem?
> >
> > Regards,
> >
> > Martin
> >
> >> -----Original Message-----
> >> From: Hiroshi Saito [mailto:z-saito(at)guitar(dot)ocn(dot)ne(dot)jp]
> >> Sent: Friday, March 26, 2010 3:36 PM
> >> To: Martin Schäfer; 'Takahiro Itagaki'
> >> Cc: pgsql-bugs(at)postgresql(dot)org
> >> Subject: Re: [BUGS] UTF-8 encoding failure
> >>
> >> Hi.
> >>
> >> Ahh ok, Would you try this.
> >>
> >> C:\home\HIROSHI>"C:\Program
> >> Files\PostgreSQL\8.4\bin\psql.exe" -f SJIS_TEST.SQL
> >> -p5433 postgres postgres
> >>
> >> データベ
> >> ース一覧
> >> \x96\xBC\x91O | \x8F\x8A\x97L\x8E |
> >> \x83G\x83\x93\x83R\x81[\x83f\x83B\x83\x93\x
> >> 83O | \x8Fニ構x87\x8F\x87\x8F\x98 |
> >> Ctype(\x95マ浬xB7\x89\x89\x8EZ\x8Eq) | \x83A\x 83N\x83Z\x83X\x8C\xA0
> >> ---------------+-------------------+--------------------------
> >> ----------
> >> ---------------+-------------------+--------
> >> ----+---------------------------+-----------------------------
> >> -------+--
> >> ----+---------------------------+-----------------------------
> >> -------+--
> >> ----+---------------------------+-----------------------------
> >> -------+--
> >> ----+---------------------------+-----------------------------
> >> -------+--
> >> ----+---------------------------+-----------------------------
> >> -------+--
> >> --------------------
> >> postgres | postgres | UTF8
> >> | C | C
> |
> >> template0 | postgres | UTF8
> >> | C | C
> >> | =c/postgr
> >> es
> >>
> >>
> >> : postgres= CTc/postgres
> >> template1 | postgres | UTF8
> >> | C | C
> >> | =c/postgr
> >> es
> >>
> >>
> >> : postgres= CTc/postgres
> >> (3 行)
> >>
> >>
> >> UTF8
> >> SJIS
> >> psql:SJIS_TEST.SQL:5: NOTICE: CREATE TABLE / PRIMARY KEY
> >> will create implicit i ndex "漢字テーブル_pkey" for table "漢字テーブル"
> >> CREATE TABLE
> >> INSERT 0 1
> >> INSERT 0 1
> >> へんかん | どうですか
> >> ------------+------------
> >> さいとう | ひろし
> >> こんにちは | ひろしです
> >> (2 行)
> >>
> >>
> >> DROP TABLE
> >>
> >> ----- Original Message -----
> >> From: "Martin Schäfer" <Martin(dot)Schaefer(at)cadcorp(dot)com>
> >>
> >>
> >> > Hello Hiroshi-san,
> >> >
> >> > The only differences I found between my source file and
> >> yours are the file encoding
> >> > (Unicode/SJIS), different #include-s and different
> >> parameters to PQsetdblogin. I had to
> >> > undo the last two changes to compile and run on my machine.
> >> And the changed file encoding
> >> > made no difference. It still fails on my machine.
> >> >
> >> > Regards,
> >> >
> >> > Martin
> >>
> >
> **************************************************************
> **************
> > 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.
> >
> **************************************************************
> **************
> >
>
>
> --------------------------------------------------------------
> ------------------
>
>
> >
> > --
> > Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-bugs
> >
>
>
>
****************************************************************************
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.
****************************************************************************


From: "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
To: Martin Schäfer <Martin(dot)Schaefer(at)cadcorp(dot)com>, "'Takahiro Itagaki'" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: UTF-8 encoding failure
Date: 2010-03-26 16:54:10
Message-ID: 2452CA9BC78D4BF8AB52BE95B60A945F@acer08f817a9b5
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Hi.

Eh, Have I missed something?_?
set Path=%Path%;C:\Program Files\PostgreSQL\8.4\bin;
It is not this.

Regards,
Hiroshi Saito

----- Original Message -----
From: "Martin Schäfer" <Martin(dot)Schaefer(at)cadcorp(dot)com>
To: "'Hiroshi Saito'" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>; "'Takahiro Itagaki'"
<itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Sent: Saturday, March 27, 2010 12:46 AM
Subject: Re: [BUGS] UTF-8 encoding failure

> Can you copy libpq.dll to the same destination please? I linked libpq as a static library
> into my project.
>
> Martin
>
>> -----Original Message-----
>> From: Hiroshi Saito [mailto:z-saito(at)guitar(dot)ocn(dot)ne(dot)jp]
>> Sent: Friday, March 26, 2010 4:35 PM
>> To: Martin Schäfer; 'Takahiro Itagaki'
>> Cc: pgsql-bugs(at)postgresql(dot)org
>> Subject: Re: [BUGS] UTF-8 encoding failure
>>
>> Hi.
>>
>> I think that the locale is not desirable. However, It is not
>> related to this problem.
>> Can you test without editing this program?
>> http://winpg.jp/~saito/PGSQL_SJIS/
>> I think that it passes.
>>
>> Regards,
>> Hiroshi Saito
>>
>> ----- Original Message -----
>> From: "Martin Schäfer" <Martin(dot)Schaefer(at)cadcorp(dot)com>
>> To: "'Hiroshi Saito'" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>; "'Takahiro
>> Itagaki'"
>> <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
>> Cc: <pgsql-bugs(at)postgresql(dot)org>
>> Sent: Friday, March 26, 2010 11:49 PM
>> Subject: Re: [BUGS] UTF-8 encoding failure
>>
>>
>> > Hi,
>> >
>> > This worked fine, as you can see in the attached result.
>> However, I can see that my
>> > database has a different locale (English_United
>> Kingdom.1252) from yours (C). Can this
>> > cause the problem?
>> >
>> > Regards,
>> >
>> > Martin
>> >
>> >> -----Original Message-----
>> >> From: Hiroshi Saito [mailto:z-saito(at)guitar(dot)ocn(dot)ne(dot)jp]
>> >> Sent: Friday, March 26, 2010 3:36 PM
>> >> To: Martin Schäfer; 'Takahiro Itagaki'
>> >> Cc: pgsql-bugs(at)postgresql(dot)org
>> >> Subject: Re: [BUGS] UTF-8 encoding failure
>> >>
>> >> Hi.
>> >>
>> >> Ahh ok, Would you try this.
>> >>
>> >> C:\home\HIROSHI>"C:\Program
>> >> Files\PostgreSQL\8.4\bin\psql.exe" -f SJIS_TEST.SQL
>> >> -p5433 postgres postgres
>> >>
>> >> データベ
>> >> ース一覧
>> >> \x96\xBC\x91O | \x8F\x8A\x97L\x8E |
>> >> \x83G\x83\x93\x83R\x81[\x83f\x83B\x83\x93\x
>> >> 83O | \x8Fニ構x87\x8F\x87\x8F\x98 |
>> >> Ctype(\x95マ浬xB7\x89\x89\x8EZ\x8Eq) | \x83A\x 83N\x83Z\x83X\x8C\xA0
>> >> ---------------+-------------------+--------------------------
>> >> ----------
>> >> ---------------+-------------------+--------
>> >> ----+---------------------------+-----------------------------
>> >> -------+--
>> >> ----+---------------------------+-----------------------------
>> >> -------+--
>> >> ----+---------------------------+-----------------------------
>> >> -------+--
>> >> ----+---------------------------+-----------------------------
>> >> -------+--
>> >> ----+---------------------------+-----------------------------
>> >> -------+--
>> >> --------------------
>> >> postgres | postgres | UTF8
>> >> | C | C
>> |
>> >> template0 | postgres | UTF8
>> >> | C | C
>> >> | =c/postgr
>> >> es
>> >>
>> >>
>> >> : postgres= CTc/postgres
>> >> template1 | postgres | UTF8
>> >> | C | C
>> >> | =c/postgr
>> >> es
>> >>
>> >>
>> >> : postgres= CTc/postgres
>> >> (3 行)
>> >>
>> >>
>> >> UTF8
>> >> SJIS
>> >> psql:SJIS_TEST.SQL:5: NOTICE: CREATE TABLE / PRIMARY KEY
>> >> will create implicit i ndex "漢字テーブル_pkey" for table "漢字テーブル"
>> >> CREATE TABLE
>> >> INSERT 0 1
>> >> INSERT 0 1
>> >> へんかん | どうですか
>> >> ------------+------------
>> >> さいとう | ひろし
>> >> こんにちは | ひろしです
>> >> (2 行)
>> >>
>> >>
>> >> DROP TABLE
>> >>
>> >> ----- Original Message -----
>> >> From: "Martin Schäfer" <Martin(dot)Schaefer(at)cadcorp(dot)com>
>> >>
>> >>
>> >> > Hello Hiroshi-san,
>> >> >
>> >> > The only differences I found between my source file and
>> >> yours are the file encoding
>> >> > (Unicode/SJIS), different #include-s and different
>> >> parameters to PQsetdblogin. I had to
>> >> > undo the last two changes to compile and run on my machine.
>> >> And the changed file encoding
>> >> > made no difference. It still fails on my machine.
>> >> >
>> >> > Regards,
>> >> >
>> >> > Martin
>> >>
>> >
>> **************************************************************
>> **************
>> > 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.
>> >
>> **************************************************************
>> **************
>> >
>>
>>
>> --------------------------------------------------------------
>> ------------------
>>
>>
>> >
>> > --
>> > Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
>> > To make changes to your subscription:
>> > http://www.postgresql.org/mailpref/pgsql-bugs
>> >
>>
>>
>>
> ****************************************************************************
> 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.
> ****************************************************************************
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>


From: Martin Schäfer <Martin(dot)Schaefer(at)cadcorp(dot)com>
To: 'Hiroshi Saito' <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>, 'Takahiro Itagaki' <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: UTF-8 encoding failure
Date: 2010-03-30 06:51:50
Message-ID: 11A8567A97B15648846060F5CD818EB840FF19F7EF@DEV001EX.Dev.cadcorp.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Okay, got it now.

Unfortunately, the output is exactly the same as before:

G:\Test\TestPostgreSQLJapanese>PostgreSQLJapaneseSJIS.exe localhost 5432 dev308 postgres postgres
localhost 5432 dev308 postgres postgres
Testing with encoding UTF-8:
NOTICE: CREATE TABLE will create implicit sequence "蝗帛ョ誉gid_seq" for serial column "蝗帛ョ・gid"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "蝗帛ョ誉pkey" for table "蝗帛ョ・
PQfname(pResult, 4) returned incorrect field name.
PQfname(pResult, 5) returned incorrect field name.
PQfname(pResult, 6) returned incorrect field name.

Testing with encoding SJIS:
NOTICE: CREATE TABLE will create implicit sequence "四宗_gid_seq" for serial column "四宗.gid"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "四宗_pkey" for table "四宗"
Query failed 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".

I'm beginning to believe that the problem is indeed in the combination of UK English operating system with Japanese locale. Maybe someone else could test this combination?

Regards,

Martin

> -----Original Message-----
> From: Hiroshi Saito [mailto:z-saito(at)guitar(dot)ocn(dot)ne(dot)jp]
> Sent: Friday, March 26, 2010 5:54 PM
> To: Martin Schäfer; 'Takahiro Itagaki'
> Cc: pgsql-bugs(at)postgresql(dot)org
> Subject: Re: [BUGS] UTF-8 encoding failure
>
> Hi.
>
> Eh, Have I missed something?_?
> set Path=%Path%;C:\Program Files\PostgreSQL\8.4\bin; It is not this.
>
> Regards,
> Hiroshi Saito
>
> ----- Original Message -----
> From: "Martin Schäfer" <Martin(dot)Schaefer(at)cadcorp(dot)com>
> To: "'Hiroshi Saito'" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>; "'Takahiro
> Itagaki'"
> <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
> Cc: <pgsql-bugs(at)postgresql(dot)org>
> Sent: Saturday, March 27, 2010 12:46 AM
> Subject: Re: [BUGS] UTF-8 encoding failure
>
>
> > Can you copy libpq.dll to the same destination please? I
> linked libpq as a static library
> > into my project.
> >
> > Martin
> >
> >> -----Original Message-----
> >> From: Hiroshi Saito [mailto:z-saito(at)guitar(dot)ocn(dot)ne(dot)jp]
> >> Sent: Friday, March 26, 2010 4:35 PM
> >> To: Martin Schäfer; 'Takahiro Itagaki'
> >> Cc: pgsql-bugs(at)postgresql(dot)org
> >> Subject: Re: [BUGS] UTF-8 encoding failure
> >>
> >> Hi.
> >>
> >> I think that the locale is not desirable. However, It is not
> >> related to this problem.
> >> Can you test without editing this program?
> >> http://winpg.jp/~saito/PGSQL_SJIS/
> >> I think that it passes.
> >>
> >> Regards,
> >> Hiroshi Saito
> >>
> >> ----- Original Message -----
> >> From: "Martin Schäfer" <Martin(dot)Schaefer(at)cadcorp(dot)com>
> >> To: "'Hiroshi Saito'" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>; "'Takahiro
> >> Itagaki'"
> >> <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
> >> Cc: <pgsql-bugs(at)postgresql(dot)org>
> >> Sent: Friday, March 26, 2010 11:49 PM
> >> Subject: Re: [BUGS] UTF-8 encoding failure
> >>
> >>
> >> > Hi,
> >> >
> >> > This worked fine, as you can see in the attached result.
> >> However, I can see that my
> >> > database has a different locale (English_United
> >> Kingdom.1252) from yours (C). Can this
> >> > cause the problem?
> >> >
> >> > Regards,
> >> >
> >> > Martin
> >> >
> >> >> -----Original Message-----
> >> >> From: Hiroshi Saito [mailto:z-saito(at)guitar(dot)ocn(dot)ne(dot)jp]
> >> >> Sent: Friday, March 26, 2010 3:36 PM
> >> >> To: Martin Schäfer; 'Takahiro Itagaki'
> >> >> Cc: pgsql-bugs(at)postgresql(dot)org
> >> >> Subject: Re: [BUGS] UTF-8 encoding failure
> >> >>
> >> >> Hi.
> >> >>
> >> >> Ahh ok, Would you try this.
> >> >>
> >> >> C:\home\HIROSHI>"C:\Program
> >> >> Files\PostgreSQL\8.4\bin\psql.exe" -f SJIS_TEST.SQL
> >> >> -p5433 postgres postgres
> >> >>
> >> >> データベ
> >> >> ース一覧
> >> >> \x96\xBC\x91O | \x8F\x8A\x97L\x8E |
> >> >> \x83G\x83\x93\x83R\x81[\x83f\x83B\x83\x93\x
> >> >> 83O | \x8Fニ構x87\x8F\x87\x8F\x98 |
> >> >> Ctype(\x95マ浬xB7\x89\x89\x8EZ\x8Eq) | \x83A\x
> 83N\x83Z\x83X\x8C\xA0
> >> >> ---------------+-------------------+--------------------------
> >> >> ----------
> >> >> ---------------+-------------------+--------
> >> >> ----+---------------------------+-----------------------------
> >> >> -------+--
> >> >> ----+---------------------------+-----------------------------
> >> >> -------+--
> >> >> ----+---------------------------+-----------------------------
> >> >> -------+--
> >> >> ----+---------------------------+-----------------------------
> >> >> -------+--
> >> >> ----+---------------------------+-----------------------------
> >> >> -------+--
> >> >> --------------------
> >> >> postgres | postgres | UTF8
> >> >> | C | C
> >> |
> >> >> template0 | postgres | UTF8
> >> >> | C | C
> >> >> | =c/postgr
> >> >> es
> >> >>
> >> >>
> >> >> : postgres= CTc/postgres
> >> >> template1 | postgres | UTF8
> >> >> | C | C
> >> >> | =c/postgr
> >> >> es
> >> >>
> >> >>
> >> >> : postgres= CTc/postgres
> >> >> (3 行)
> >> >>
> >> >>
> >> >> UTF8
> >> >> SJIS
> >> >> psql:SJIS_TEST.SQL:5: NOTICE: CREATE TABLE / PRIMARY KEY
> >> >> will create implicit i ndex "漢字テーブル_pkey" for table "漢字テーブル"
> >> >> CREATE TABLE
> >> >> INSERT 0 1
> >> >> INSERT 0 1
> >> >> へんかん | どうですか
> >> >> ------------+------------
> >> >> さいとう | ひろし
> >> >> こんにちは | ひろしです
> >> >> (2 行)
> >> >>
> >> >>
> >> >> DROP TABLE
> >> >>
> >> >> ----- Original Message -----
> >> >> From: "Martin Schäfer" <Martin(dot)Schaefer(at)cadcorp(dot)com>
> >> >>
> >> >>
> >> >> > Hello Hiroshi-san,
> >> >> >
> >> >> > The only differences I found between my source file and
> >> >> yours are the file encoding
> >> >> > (Unicode/SJIS), different #include-s and different
> >> >> parameters to PQsetdblogin. I had to
> >> >> > undo the last two changes to compile and run on my machine.
> >> >> And the changed file encoding
> >> >> > made no difference. It still fails on my machine.
> >> >> >
> >> >> > Regards,
> >> >> >
> >> >> > Martin
> >> >>
> >> >
> >> **************************************************************
> >> **************
> >> > 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.
> >> >
> >> **************************************************************
> >> **************
> >> >
> >>
> >>
> >> --------------------------------------------------------------
> >> ------------------
> >>
> >>
> >> >
> >> > --
> >> > Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> >> > To make changes to your subscription:
> >> > http://www.postgresql.org/mailpref/pgsql-bugs
> >> >
> >>
> >>
> >>
> >
> **************************************************************
> **************
> > 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.
> >
> **************************************************************
> **************
> >
> > --
> > Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-bugs
> >
>
>
>
****************************************************************************
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.
****************************************************************************


From: "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
To: Martin Schäfer <Martin(dot)Schaefer(at)cadcorp(dot)com>, "'Takahiro Itagaki'" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: UTF-8 encoding failure
Date: 2010-03-30 17:30:06
Message-ID: FEB6F18C955B497FB3729BA749DCB278@acer08f817a9b5
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Hi.

Ummm, it is very strange....
Can you do chcp command?

C:\home\HIROSHI>chcp 932
現在のコード ページ: 932

Anyway, I want to prepare and check the same environment as you.
It may be that there is a shortage of environment for changing some.
the following things , but, It is hard to consider a problem...
http://download.microsoft.com/download/6/2/e/62e61f10-e106-4f4c-a862-63eec2b41efb/readme.htm
However, time is required.

Regards,
Hiroshi Saito

----- Original Message -----
From: "Martin Schäfer" <Martin(dot)Schaefer(at)cadcorp(dot)com>

> Okay, got it now.
>
> Unfortunately, the output is exactly the same as before:
>
> G:\Test\TestPostgreSQLJapanese>PostgreSQLJapaneseSJIS.exe localhost 5432 dev308 postgres
> postgres
> localhost 5432 dev308 postgres postgres
> Testing with encoding UTF-8:
> NOTICE: CREATE TABLE will create implicit sequence "蝗帛ョ誉gid_seq" for serial column "蝗帛ョ・gid"
> NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "蝗帛ョ誉pkey" for table "蝗帛ョ・
> PQfname(pResult, 4) returned incorrect field name.
> PQfname(pResult, 5) returned incorrect field name.
> PQfname(pResult, 6) returned incorrect field name.
>
> Testing with encoding SJIS:
> NOTICE: CREATE TABLE will create implicit sequence "四宗_gid_seq" for serial column "四宗.gid"
> NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "四宗_pkey" for table "四宗"
> Query failed 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".
>
> I'm beginning to believe that the problem is indeed in the combination of UK English
> operating system with Japanese locale. Maybe someone else could test this combination?
>
> Regards,
>
> Martin