Bug #33154 Automatically figure out the correct ANSI character set
Submitted: 11 Dec 2007 21:48
Reporter: Jim Winstead Email Updates:
Status: Verified Impact on me:
Category:Connector / ODBC Severity:S4 (Feature request)
Version:5.2 OS:Any
Assigned to: CPU Architecture:Any
Tags: ansi, character set, GetACP, nl_langinfo
Triage: D5 (Feature request)

[11 Dec 2007 21:48] Jim Winstead
The 'ANSI' character set currently defaults to latin1, but it is possible to find out what the system's default ANSI character set should be.

How to repeat:
Use C/ODBC on Windows with a different default ANSI character set.

Suggested fix:
On Windows, it can be determined by using GetACP():

On Unix systems, nl_langinfo(CODESET) can be used:

DataDirect uses a DSN setting:

We would have to map these types to the appropriate MySQL character sets.