utf8 with CEGUI? [solved]

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Toge
Just popping in
Just popping in
Posts: 12
Joined: Thu Jan 22, 2009 21:59

utf8 with CEGUI? [solved]

Postby Toge » Fri Jan 23, 2009 10:01

Hello again.

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

Thanks
Last edited by Toge on Sat Feb 14, 2009 23:12, edited 1 time in total.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Fri Jan 23, 2009 10:26

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.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 19 guests