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:
None 
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
Description:
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():
  http://msdn2.microsoft.com/en-us/library/ms776259.aspx

On Unix systems, nl_langinfo(CODESET) can be used:
  http://www.opengroup.org/onlinepubs/009695399/functions/nl_langinfo.html

DataDirect uses a DSN setting:
  http://www.datadirect.com/support/troubleshooting/su_faq_iana/index.ssp

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