Re: Continuing encoding fun....
От | Marc Herbert |
---|---|
Тема | Re: Continuing encoding fun.... |
Дата | |
Msg-id | 871x16yvrk.fsf@meije.emic.fr обсуждение исходный текст |
Ответ на | Re: Continuing encoding fun.... ("Dave Page" <dpage@vale-housing.co.uk>) |
Список | 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@vale-housing.co.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?
В списке pgsql-odbc по дате отправления: