Bug #71088 | Support Unicode Strings | ||
---|---|---|---|
Submitted: | 5 Dec 2013 8:19 | Modified: | 6 Dec 2013 9:00 |
Reporter: | Peter Schäfer | Email Updates: | |
Status: | Open | Impact on me: | |
Category: | Connector / C++ | Severity: | S4 (Feature request) |
Version: | OS: | Any | |
Assigned to: | CPU Architecture: | Any |
[5 Dec 2013 8:19]
Peter Schäfer
[6 Dec 2013 8:37]
Peter Schäfer
Just did some research into MySQL character sets. The character set for results can be set with SET SESSION character_set_results=ucs2 or SET SESSION character_set_results=utf16 SET SESSION character_set_results=utf16le Unforutnately, it doesn't work for prepared statements :-( SET SESSION character_set_client=ucs2 SET SESSION character_set_client=utf16 fails with a meaningless error. Seems like character_set_client must be an 8-byte encoding, and unicode strings must be re-encoded as utf-8, *even if* the database can store ucs2. Disapppointing...
[6 Dec 2013 9:00]
Peter Schäfer
One more problem: SET SESSION character_set_results=utf16 will throw: SQLException("Server sent uknown charsetnr. Please report"); utf16 is not defined in mysql_util.cpp