https://bugs.freedesktop.org/show_bug.cgi?id=68676

          Priority: medium
            Bug ID: 68676
          Assignee: [email protected]
           Summary: ODBC: optionally use W variants of ODBC calls
          Severity: enhancement
    Classification: Unclassified
                OS: All
          Reporter: [email protected]
          Hardware: All
            Status: UNCONFIRMED
           Version: 4.2.0.0.alpha0+ Master
         Component: Database
           Product: LibreOffice

Currently, LibreOffice only uses the "ANSI" variants of the ODBC calls, never
the Unicode variants (with a W suffix). However, much (but not all) of the code
is actually prepared to use the Unicode variants.

Using the Unicode variants can be useful because it allows us not to mess with
encodings, we get more-or-less directly the UTF-16 that our OUStrings need.
Also, it allows to work around bugs in ODBC drivers, see e.g. the discussion in
comment 13 of bug 68426. But it may trigger *other* bugs in ODBC drivers...

Some decision needs to be done when to use which variant. Possibly it should
just be an "Advanced setting" (see menu edit / database / advanced settings),
or even better something set in the same dialog tab as the connection charset.

See in directory connectivity/source/drivers/odbcbase/:

 - OTools.cxx: argument _bUseWChar to various functions

 - OPreparedStatement.cxx: constant useWChar

 - OResultsetMetaData.cxx: this one is not ready;
   need to use N3SQLColAttribute OR  N3SQLColAttributeW
   depending on conditions / configuration / ...

directory connectivity/source/drivers/odbc/:

 - OFunctions.cxx

 - ORealDriver.cxx

these to add the W variants to these two functions.

There is a good explanation on ODBC and Unicode in general at
http://www.easysoft.com/products/data_access/odbc_oracle_driver/unicode.html#odbc
the authoritative reference is at
http://msdn.microsoft.com/en-us/library/windows/desktop/ms716246(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms709439(v=vs.85).aspx

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to