Ok, you're right.
Only for other one with same problem:
only use the follow code befor connect with mysql++:
con.set_option(new mysqlpp::SetCharsetNameOption("utf8"));
Greetings
Torsten
Koen Deforche schrieb:
> Hey Torsten,
>
> 2008/11/28 Torsten Schulz <[EMAIL PROTECTED]>:
>
>> My Database is configures as utf_unicode_ci. The Datafield is
>> configured as utf_unicode_ci too. If I write it with cout, I see the
>> correct message - but I don't see the word in WText. In WComboBox I see
>>
>
> Then I assume your locale is not utf8 ($echo $LANG will tell you what
> it is), and the database exports data over the database connection by
> default using some non-UTF8 locale.
>
> (I do not have particular experience with MySQL + UTF8, but am basing
> myself on http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html
> and http://www.vlugge.eu/blog/c++/mysql-mysql-c-api-and-utf-8-encoding/)
>
> You need to make sure you (or your sql library) issue an SET NAMES
> 'utf8' when connecting to the database ?
>
>
>> the word, but with wrong charakter ("Ich w?re froh" as example). I've
>>
>
> This is what would happen if for example your database converted
> unicode to plain ASCII.
>
>
>> written a workaround, so the charakters will be replaced with HTML-Codes
>> - but I can't use it with WComboBox. If I use ä in <select...>
>> <option>...</option>... it will be displayed as รค - but in Witty it's
>> written as ä, so the workaround only works with WText.
>>
>
> WComboBox displays text literally, while WText has support for XHTML
> text. This is all fine from the point of view of Wt -- what you need
> to do is explain to your database that you wish to read and write UTF8
> over the connection, and then use WString's fromUTF8() and toUTF8()
> methods.
>
> The format in which the database saves the data (whether it is Latin,
> UTF8 or UTF16) is not as important as the character set the database
> assumes you want to use to talk to the database.
>
> Regards,
> koen
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest