Re: UTF-8 encoding failure

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jasen Betts 2010-03-30 07:56:34 Re: dividing money by money
Previous Message Kevin Grittner 2010-03-30 04:18:07 Re: dividing money by money