off -witty- topic
its working now. for all who have similar problems with databases.
what i did in database and mysql++:
system locales must contain utf8
mysql configs must take utf8 for connections (in mysql config files)
mysqlpp connection charset have to be set to utf8:
<snip>
mysqlpp::SetCharsetNameOption *option = new
mysqlpp::SetCharsetNameOption("utf8");
mysqlpp::Connection con;
con.set_option (option);
con.connect(db, server, user, passwd);
<snip>
thanx a lot!
ciao,
joerg.
> On Tue, Nov 24, 2009 at 2:27 AM, jhig <[email protected]> wrote:
> > hi,
> >
> > i'm using a Wt::Ext::TableView to print a mysql table on a gentoo-linux
> > machine.
> > it is used like in the extkitchen example.
> > my mysql++ function returns a non-unicode string (mysqlpp::String).
> > when using this string in the table german umlauts are printed as
> > question marks.
> >
> > i tried to convert the resulted mysql-string into WString with no effect.
> > i'm not sure if this is a unix, mysql or witty problem.
> >
> > has someone a clue?
>
> Been a long time for me, but I think that MySQLs string type is based
> on how the server is setup, check your configuration and see if it is
> set to UTF-8, if it is then simply loading it into a WString should be
> fine, if it is anything else at all, then you need to convert it to
> UTF8 first, or change your MySQL configuration to UTF8 (and you will
> need to reload all of your string database data). I think by default
> MySQL uses UTF-8, but I think in some cases if running on a Windows
> server it defaults to UCS-2 in which case you would need to use the
> native functions MultiByteToWideChar and WideCharToMultiByte. I
> personally just ensure that everything I do and use is UTF-8 so I do
> not need to deal with conversion overhead.
>
> First, check your MySQL string configuration and see if it is set for
> UTF-8. If it is set to UTF-8 then try storing the string "test" in your
> database, then create a C++ program to read from it and give us the
> hexadecimal representation of it in the MySQL String and we can tell
> you what format your MySQL is using based on that.
>
> ---------------------------------------------------------------------------
> --- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day trial. Simplify your report design, integration and deployment -
> and focus on what you do best, core application coding. Discover what's
> new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest