Page 1 of 1

utf8 with CEGUI? [solved]

Posted: Fri Jan 23, 2009 10:01
by Toge
Hello again.

How can I enable utf8 code for text in CEGUI? I want to use accents and other strange chars.

Thanks

Posted: Fri Jan 23, 2009 10:26
by CrazyEddie
Hi, and welcome :)

There are basically two things you need to do.

First, cast string literals to CEGUI::utf8*, maybe like this:

Code: Select all

myCEGUIWindow->setText( (CEGUI::utf8*)"Some Text" );


Second, and most important, is that your source files (and XML where appropriate) must be saved using utf8 encoding. There is usually an option for this in the text editor or IDE.

HTH

CE.