Patrice Serrand wrote:
> mysql_query (mysql, "INSERT INTO db_unicode.unicode_tbl VALUES (6, _utf8
> 'atüpedâ' COLLATE utf8_general_ci)");
I'm no Unicode expert, but I've never seen that _utf8 bit before. What
is it? Or more accurately, what do you expect it to do? I ask because
that string is probably already in UTF-8 form, if your text editor is
UTF-8 aware. The common Unix text editors are, as is the editor in the
Visual Studio IDE.
I've done very similar things with MySQL++, the C++ wrapper for the C
API, which I maintain. http://tangentsoft.net/mysql++/ No _utf8 stuff
was required. Check out examples/resetdb.cpp and examples/custom3.cpp
in the distribution.
> Everything works like if the C API only accepts ANSI strings.
Nonsense. All the C API cares about are null-terminated C strings,
which UTF-8 data is.
|• unicode and C API||Patrice Serrand||24 May|
| • Re: unicode and C API||Warren Young||24 May|