Open
Description
Currently the driver has two issues with Unicode functions:
- They are just front-end to ANSI functions that defeats their purpose: ability to work with symbols outside of ANSI codepage.
- A couple of bugs in ANSI<->Unicode conversion code assumes that
SQLWCHAR
iswchar_t
andsizeof(wchar_t)
is 2. The former makes the driver non-working with unixODBC and the latter - with iODBC.
I see following solutions for it:
- Drop charset option and fix the connection charset to NONE, performing conversion between storage charset and ANSI/Unicode on the client side. It will cause problems with server error messages and string literals in queries effectively limiting them to ASCII.
- Automatically set connection charset to match ANSI codepage (current locale) for
SQL*Connect
functions and fix it to UTF-8 forSQL*ConnectW
functions. It will solve problems above but cause a new one with applications that use ANSI connection while still want to work with Unicode data usingSQLGetData
. - Set connection charset to UTF-8 unconditionally and perform ANSI/Unicode conversions on the client side. No problems above but if the database charset is not UTF-8, a server-side conversion is enforced causing a higher load. Besides, it requires more changes in codebase.
So, no perfect solution. Or may be anyone see one?..
Metadata
Metadata
Assignees
Labels
No labels