From: Ben Trewern <ben.trewern@_nospam_mowlem.com>
To: pgsql-odbc@postgresql.org
Subject: Re: Bug or not about ASCII and Multi-Byte character set
Date: Mon, 15 Aug 2005 13:43:52 +0100
Message-ID: <ddq2g1$2rk3$1@news.hub.org> (raw)
References: <000101c5a10a$d47e0e02$6a01a8c0@valehousing.co.uk>
I'd like to make a few points on this issue.
1. This problem should be mentioned in the FAQs as largely as possible as
it is difficult to rectify if you have fallen into this trap.
2. If you do have data in SQL_ASCII the old ODBC driver worked, PgAdmin III
works, Delphi and zeoslib works, I understand why there may be a problem but
is it not possible to make the new 8.x work?
3. Correct me if I'm wrong but SQL_ASCII is PostgreSQL's default encoding.
If this isn't sorted out then we'll see lots more of these messages for
help.
4. I'd like to disagree with your "DO NOT USE ASCII FOR NON-ASCII DATA" as
if you read any of Tom Lanes many messages on the subject. Here's a quote:
"The SQL_ASCII setting isn't an
encoding, really; it's a declaration of ignorance. In this setting
the server will just store and regurgitate whatever character strings
you send it. This will work fine, more or less, if all your clients
use exactly the same encoding and you don't care about functions like
upper()/lower()"
It should be possible to use SQL_ASCII and get out what you put in. That's
how I read the above statement and at the moment the 8.0 version of the ODBC
driver doesn't to that. I only wish I knew enough C to look into this and
make an attemp at fixing this problem.
Regards,
Ben
""Dave Page"" <dpage@vale-housing.co.uk> wrote in message
news:000101c5a10a$d47e0e02$6a01a8c0@valehousing.co.uk...
>
> As I have said a number of times now, DO NOT USE ASCII FOR NON-ASCII
> DATA!!!
>
> Whilst some apps like pgAdmin may do what you expect, other apps and
> interfaces may not.
>
> Instead of ASCII, use the correct encoding for your data, or try Unicode
> if unsure.
>
> Regards, Dave
>
> -----Original Message-----
> From: "Josef Springer"<Josef.Springer@JOOPS.COM>
> Sent: 14/08/05 18:49:49
> To: "ZF"<zf.tech@gmail.com>
> Cc: "pgsql-odbc@postgresql.org"<pgsql-odbc@postgresql.org>
> Subject: Re: [ODBC] Bug or not about ASCII and Multi-Byte character set
>
> Multibyte characters are written correctly but readed wrong by the ODBC
> driver. Seems to work on WinXP clients right. Only Win2k clients may
> have this problem. This bug may be corrected in PostgreSQL 8.1.
>
> Josef Springer
>
> ZF wrote:
>
>>version: psqlodbc 08.00.0101 and 08.00.0102
>>
>>The server database encoding is ASCII in win2000. After inserting several
>>multi-byte characters with pgAdmin3(version: 1.2.1), i found the odbc
>>driver can't provide the right data (application is written in visual c++
>>and call ODBC API to access db server). All displayed multi-byte char set
>>data were not correct but the ASCII data was right. However, pgAdmin3 can
>>correctly insert and select all data .
>>
>>Then i read the "mylog" file and found the multi-byte data have been got
>>correctly from server.
>>Is it possible that some function (maybe the converting function) have a
>>little bug?
>>
>>
>>P.S.
>>if the server db encoding is UNICODE and producing a new psqlodbc.dll
>>through deleting all SQL*W function in 'psqlodbc_win32.def' file, i got
>>Delphi applications using odbc driver can show all right data.
>>---------------------------(end of broadcast)---------------------------
>>TIP 9: In versions below 8.0, the planner will ignore your desire to
>> choose an index scan if your joining column's datatypes do not
>> match
>>
>
> --
>
> mit freundlichen GrĂ¼ssen,
> Josef Springer
> (Gescha"ftsleitung)
>
> <cid:part1.05000701.06060503@netscape.com> -- the software company --
>
> Orlando-di-Lasso Str. 2
> D-85640 Putzbrunn
>
> Tel. ++49(0)89 600 6920
> Fax ++49(0)89 600 69220
> mailto Josef.Springer@joops.com <mailto:Josef.Springer@joops.com>
> Website http://www.joops.com
>
>
>
>
>
> -----Unmodified Original Message-----
> Multibyte characters are written correctly but readed wrong by the ODBC
> driver. Seems to work on WinXP clients right. Only Win2k clients may
> have this problem. This bug may be corrected in PostgreSQL 8.1.
>
> Josef Springer
>
> ZF wrote:
>
>>version: psqlodbc 08.00.0101 and 08.00.0102
>>
>>The server database encoding is ASCII in win2000. After inserting several
>>multi-byte characters with pgAdmin3(version: 1.2.1), i found the odbc
>>driver can't provide the right data (application is written in visual c++
>>and call ODBC API to access db server). All displayed multi-byte char set
>>data were not correct but the ASCII data was right. However, pgAdmin3 can
>>correctly insert and select all data .
>>
>>Then i read the "mylog" file and found the multi-byte data have been got
>>correctly from server.
>>Is it possible that some function (maybe the converting function) have a
>>little bug?
>>
>>
>>P.S.
>>if the server db encoding is UNICODE and producing a new psqlodbc.dll
>>through deleting all SQL*W function in 'psqlodbc_win32.def' file, i got
>>Delphi applications using odbc driver can show all right data.
>>---------------------------(end of broadcast)---------------------------
>>TIP 9: In versions below 8.0, the planner will ignore your desire to
>> choose an index scan if your joining column's datatypes do not
>> match
>>
>
> --
>
> mit freundlichen GrĂ¼ssen,
> Josef Springer
> (Gescha"ftsleitung)
>
> <cid:part1.05000701.06060503@netscape.com> -- the software company --
>
> Orlando-di-Lasso Str. 2
> D-85640 Putzbrunn
>
> Tel. ++49(0)89 600 6920
> Fax ++49(0)89 600 69220
> mailto Josef.Springer@joops.com <mailto:Josef.Springer@joops.com>
> Website http://www.joops.com
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: ben.trewern@_nospam_mowlem.com
Subject: Re: Bug or not about ASCII and Multi-Byte character set
In-Reply-To: <ddq2g1$2rk3$1@news.hub.org>
References: <000101c5a10a$d47e0e02$6a01a8c0@valehousing.co.uk> <ddq2g1$2rk3$1@news.hub.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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