Re: Continuing encoding fun....

From: Marc Herbert <Marc(dot)Herbert(at)continuent(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Cc: unixodbc-dev(at)unixodbc(dot)org
Subject: Re: Continuing encoding fun....
Date: 2005-11-24 14:18:23
Message-ID: 871x16yvrk.fsf@meije.emic.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

[Cross-posting to unixodbc-devel. Also crossing fingers so it works]
Archives of both lists here for instance: <http://dir.gmane.org/search.php?match=odbc>

"Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> writes:
>
> The docs are somewhat fuzzy on this point, simply stating that
>
> "If the driver is a Unicode driver, the Driver Manager makes function
> calls as follows:" ... "Converts an ANSI function (with the A suffix)
> to a Unicode function (with the W suffix) by converting the string
> arguments into Unicode characters and passes the Unicode function to
> the driver."
>
> (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcunicode_applications.asp)
>
> My assertion that the driver does the conversion comes from the SQL
> Server driver which allows you to turn conversion on or off:
>
> "Perform translation for character data check box
>
> When selected, the SQL Server ODBC driver converts ANSI strings sent
> between the client computer and SQL Server by using Unicode. The SQL
> Server ODBC driver sometimes converts between the SQL Server code page
> and Unicode on the client computer. This requires that the code page
> used by SQL Server be one of the code pages available on the client
> computer.
>
> When cleared, no translation of extended characters in ANSI character
> strings is done when they are sent between the client application and
> the server. If the client computer is using an ANSI code page (ACP)
> different from the SQL Server code page, extended characters in ANSI
> character strings may be misinterpreted. If the client computer is
> using the same code page for its ACP that SQL Server is using, the
> extended characters are interpreted correctly."
>
> If Microsoft intended the DM to do the conversion when they wrote the
> spec, why would they then add the same functionality to their driver?

Here is a hypothesis: the checkbox in SQL Server driver is actually a
switch between the ANSI version and the Unicode version of this
driver. That would be pretty much consistent with all the above. The
only inconsistency would be: "The driver converts...", to be actually
read as: "This setting triggers the conversion operated by the DM".

What do you think?

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message noreply 2005-11-24 14:24:34 [ psqlodbc-Bugs-1000414 ] file based dns does not connect
Previous Message Marc Herbert 2005-11-24 14:10:23 Microsoft harmful extensions to 8859-X charsets (was: Continuing encoding fun....)