pg.ddx.io pgsql-odbc@postgresql.org mailing list archivehelp / color / mirror / Atom feed
UNICODE 4+ messages / 3 participants [nested] [flat]
* UNICODE @ 2013-07-09 16:29 FAU <fau@email.com> 2013-07-10 03:27 ` Re: UNICODE Inoue, Hiroshi <inoue@tpf.co.jp> 0 siblings, 1 reply; 4+ messages in thread From: FAU @ 2013-07-09 16:29 UTC (permalink / raw) To: pgsql-odbc Hello, I'm trying to understand how (unix)ODBC and psqlodbc work together regarding UNICODE. So from what I understand is that ODBC UNICODE is/was inherently UCS-2LE. Does the UNICODE driver version (which is psqlodbcw.so I assume) expect/send UCS-2LE or (as I read somewhere) UTF-8, or does it expect/send whatever the back-end database is setup to? Does the driver work the same way on Win and GNU/Linux regarding UNICODE? Thanks, Frank -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: UNICODE 2013-07-09 16:29 UNICODE FAU <fau@email.com> @ 2013-07-10 03:27 ` Inoue, Hiroshi <inoue@tpf.co.jp> 2013-07-10 04:17 ` Re: UNICODE FAU <fau@email.com> 0 siblings, 1 reply; 4+ messages in thread From: Inoue, Hiroshi @ 2013-07-10 03:27 UTC (permalink / raw) To: FAU <fau@email.com>; +Cc: pgsql-odbc Hi, (2013/07/10 1:29), FAU wrote: > Hello, > > I'm trying to understand how (unix)ODBC and psqlodbc work together > regarding UNICODE. > > So from what I understand is that ODBC UNICODE is/was inherently > UCS-2LE. Currently UTF-16LE or UTF-16BE according to the endianness of the machine. > Does the UNICODE driver version (which is psqlodbcw.so I > assume) expect/send UCS-2LE or (as I read somewhere) UTF-8, or does it > expect/send whatever the back-end database is setup to? The unicode driver expects UTF-16 not UTF-8. If you are to pass/accept UTF-8 string parameters, use the ANSI version of the driver and set client_encoding to 'UTF-8'. > Does the driver work the same way on Win and GNU/Linux regarding > UNICODE? Yes. regards, Hiroshi Inoue -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: UNICODE 2013-07-09 16:29 UNICODE FAU <fau@email.com> 2013-07-10 03:27 ` Re: UNICODE Inoue, Hiroshi <inoue@tpf.co.jp> @ 2013-07-10 04:17 ` FAU <fau@email.com> 2013-07-10 16:12 ` Re: UNICODE Hiroshi Inoue <inoue@tpf.co.jp> 0 siblings, 1 reply; 4+ messages in thread From: FAU @ 2013-07-10 04:17 UTC (permalink / raw) To: pgsql-odbc On Wed, 2013-07-10 at 12:27 +0900, Inoue, Hiroshi wrote: > Hi, > > (2013/07/10 1:29), FAU wrote: > > Hello, > > > > I'm trying to understand how (unix)ODBC and psqlodbc work together > > regarding UNICODE. > > > > So from what I understand is that ODBC UNICODE is/was inherently > > UCS-2LE. > > Currently UTF-16LE or UTF-16BE according to the endianness of the > machine. > > > Does the UNICODE driver version (which is psqlodbcw.so I > > assume) expect/send UCS-2LE or (as I read somewhere) UTF-8, or does it > > expect/send whatever the back-end database is setup to? > > The unicode driver expects UTF-16 not UTF-8. > If you are to pass/accept UTF-8 string parameters, use the ANSI > version of the driver and set client_encoding to 'UTF-8'. What if the back end database is not setup to unicode (e.g. 8859-1 or whatever) and the odbc client decides to use the wide/utf-16 API does this work out for the client? If it does then this would mean that there would be some conversion along the path (either done by the driver manager, the driver or the database). > > > Does the driver work the same way on Win and GNU/Linux regarding > > UNICODE? > > Yes. > > regards, > Hiroshi Inoue > > > > -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: UNICODE 2013-07-09 16:29 UNICODE FAU <fau@email.com> 2013-07-10 03:27 ` Re: UNICODE Inoue, Hiroshi <inoue@tpf.co.jp> 2013-07-10 04:17 ` Re: UNICODE FAU <fau@email.com> @ 2013-07-10 16:12 ` Hiroshi Inoue <inoue@tpf.co.jp> 0 siblings, 0 replies; 4+ messages in thread From: Hiroshi Inoue @ 2013-07-10 16:12 UTC (permalink / raw) To: FAU <fau@email.com>; +Cc: pgsql-odbc (2013/07/10 13:17), FAU wrote: > On Wed, 2013-07-10 at 12:27 +0900, Inoue, Hiroshi wrote: >> Hi, >> >> (2013/07/10 1:29), FAU wrote: >>> Hello, >>> >>> I'm trying to understand how (unix)ODBC and psqlodbc work together >>> regarding UNICODE. >>> >>> So from what I understand is that ODBC UNICODE is/was inherently >>> UCS-2LE. >> >> Currently UTF-16LE or UTF-16BE according to the endianness of the >> machine. >> >>> Does the UNICODE driver version (which is psqlodbcw.so I >>> assume) expect/send UCS-2LE or (as I read somewhere) UTF-8, or does it >>> expect/send whatever the back-end database is setup to? >> >> The unicode driver expects UTF-16 not UTF-8. >> If you are to pass/accept UTF-8 string parameters, use the ANSI >> version of the driver and set client_encoding to 'UTF-8'. > > What if the back end database is not setup to unicode (e.g. 8859-1 or > whatever) and the odbc client decides to use the wide/utf-16 API > does this work out for the client? Yes as long as the client passes valid strings for the database. > If it does then this would mean that > there would be some conversion along the path (either done by the driver > manager, the driver or the database). Yes the driver does the conversion between UTF-16 and UTF-8 and the PG database does the conversion between UTF-8 and the database encoding. Though the PG database provides the conversion functionality between the client encoding and the server encoding, it doesn't support UTF-16 unfortunately. regards, Hiroshi INoue -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2013-07-10 16:12 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2013-07-09 16:29 UNICODE FAU <fau@email.com> 2013-07-10 03:27 ` Inoue, Hiroshi <inoue@tpf.co.jp> 2013-07-10 04:17 ` FAU <fau@email.com> 2013-07-10 16:12 ` Hiroshi Inoue <inoue@tpf.co.jp>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox