|
Home > Archive > PostgeSQL ODBC > November 2005 > Problem with Chinese characters
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Problem with Chinese characters
|
|
| Mimi Siu 2005-11-03, 8:24 pm |
| Hi:
I am using psqlodbc-08-00-0102 ODBC driver on my
Windows 2000 machine and want to insert data (with
chinese characters) to the postgresql 8.0.3 running on
RH9.
My database is encoded as UNICODE, and my sql
statement is already converted to UTF-8 before calling
SQLExecute(). But I found that the coding of the
chinese characters is not UTF-8 in the postgresql
database. Also if I insert the record with 10 chinese
characters, the length of the field should be 10, but
now it is 30.
It was previously work when I use the
psqlodbc-07-02-01 driver with postgresql 7.3.
Thanks a lot!
____________________
______________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly
| |
| Dave Page 2005-11-03, 8:24 pm |
|
> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Mimi Siu
> Sent: 03 November 2005 10:03
> To: pgsql-odbc@postgresql.org
> Subject: [ODBC] Problem with Chinese characters
>
> Hi:
>
> I am using psqlodbc-08-00-0102 ODBC driver on my
> Windows 2000 machine and want to insert data (with
> chinese characters) to the postgresql 8.0.3 running on
> RH9.
>
> My database is encoded as UNICODE, and my sql
> statement is already converted to UTF-8 before calling
> SQLExecute(). But I found that the coding of the
> chinese characters is not UTF-8 in the postgresql
> database. Also if I insert the record with 10 chinese
> characters, the length of the field should be 10, but
> now it is 30.
>
> It was previously work when I use the
> psqlodbc-07-02-01 driver with postgresql 7.3.
Please try the latest snapshot - 08.01.0005. It has various fixes and
can be compiled in Unicode or ANSI/Multibyte mode as the older 07.xx
drivers could (08.00.xxxx was Unicode only).
Regards, Dave
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
| |
| Rainer Bauer 2005-11-03, 8:24 pm |
| "Dave Page" schrieb:
>Please try the latest snapshot - 08.01.0005. It has various fixes and
>can be compiled in Unicode or ANSI/Multibyte mode as the older 07.xx
>drivers could (08.00.xxxx was Unicode only).
It least I could not compile it, because the resource file is in Japanese.
Or am I missing something?
Rainer
| |
| Dave Page 2005-11-03, 8:24 pm |
|
> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Rainer Bauer
> Sent: 03 November 2005 10:41
> To: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Problem with Chinese characters
>
> "Dave Page" schrieb:
>
>
> It least I could not compile it, because the resource file is
> in Japanese.
> Or am I missing something?
The resource file is in English and Japanese. If you cannot compile, why
not use the binaries though?
Regards, Dave
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
| |
| Rainer Bauer 2005-11-03, 8:24 pm |
| "Dave Page" schrieb:
>
>The resource file is in English and Japanese. If you cannot compile, why
>not use the binaries though?
Mmmh. You are right. I tried to compile them on my Win9x machine and that's
why it failed. After removing the Japanese resources, it works.
I am already using the 8.1.005 binaries. However I wanted to run the driver in
debug mode to be able to give a better feedback (stack trace) if the driver
should crash.
BTW, using UseServerSidePrepare
is not working. Is this the declare/fetch
issue you are currently tracking? If you need help in testing the driver, I
could check it against my application.
Rainer
| |
| Dave Page 2005-11-03, 8:24 pm |
|
> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Rainer Bauer
> Sent: 03 November 2005 11:55
> To: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Problem with Chinese characters
>
> "Dave Page" schrieb:
>
> various fixes and
> older 07.xx
> compile, why
>
> Mmmh. You are right. I tried to compile them on my Win9x
> machine and that's
> why it failed. After removing the Japanese resources, it works.
>
> I am already using the 8.1.005 binaries. However I wanted to
> run the driver in
> debug mode to be able to give a better feedback (stack trace)
> if the driver
> should crash.
>
> BTW, using UseServerSidePrepare
is not working. Is this the
> declare/fetch
> issue you are currently tracking? If you need help in testing
> the driver, I
> could check it against my application.
Yes, absolutely. I just committed what I hope will be the last fix for
this (for now at least!). Please try a build from the current CVS code
and let me know how you get on.
Thanks, Dave.
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly
| |
| Mimi Siu 2005-11-04, 7:23 am |
| Hello:
I would like to use ANSI ODBC driver as my sql
statement is already converted to UTF-8 before
calling SQLExecute(). However, i found from the log
file that the client encoding is BIG5 which is my
system's locale, so the text is wrong when it is
inserted to my UNICODE database.
Can I set the client encoding to UTF8 in my DNS or
through any ODBC functions??
Thanks a lot!
--- Dave Page <dpage@vale-housing.co.uk> wrote:
>
>
> Of Mimi Siu
> running on
> calling
> chinese
> but
>
> Please try the latest snapshot - 08.01.0005. It has
> various fixes and
> can be compiled in Unicode or ANSI/Multibyte mode as
> the older 07.xx
> drivers could (08.00.xxxx was Unicode only).
>
> Regards, Dave
>
____________________
______________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
| |
| Dave Page 2005-11-04, 7:23 am |
|
> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Mimi Siu
> Sent: 04 November 2005 09:56
> To: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Problem with Chinese characters
>
> Hello:
>
> I would like to use ANSI ODBC driver as my sql
> statement is already converted to UTF-8 before
> calling SQLExecute(). However, i found from the log
> file that the client encoding is BIG5 which is my
> system's locale, so the text is wrong when it is
> inserted to my UNICODE database.
>
> Can I set the client encoding to UTF8 in my DNS or
> through any ODBC functions??
In the connect settings box in the config, you can add something like:
SET client_encoding TO 'UTF8';
Regards, Dave.
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
|
|
|
|
|