Problems with CEGUI & Cyrylic

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
crioto
Halfling
Posts: 59
Joined: Fri Aug 11, 2006 8:34 pm
Location: Bishkek, Kyrgyzstan
Contact:

Problems with CEGUI & Cyrylic

Post by crioto »

Hi all! As you can see in the top - i have problems with displaying Cyrylic symbols in CEGUI elements. For the leraning CEGUI basics i use the "Basic Tutorial" from the wiki and go throw it! All work's fine, but cyrylic symbols...

When i try to send button name from compiller - the button displayed with title like "€Г,‡;€"...
When i trying to send button name from XML file - The program is return Debug error...I realy need to xml layouts...

So, any one can help me?
Do your work, don't be stupid
User avatar
Blakharaz
Gnoblar
Posts: 19
Joined: Wed Jun 02, 2004 8:51 pm
Location: Potsdam, Germany

Post by Blakharaz »

Did you save your files in UTF-8 encoding? I just used to put German special characters in CEGUI windows, but cyrillic characters should be the same basically. Especially the XML files should have an encoding fitting the header

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
A stack trace of your error could be helpful too.
Coder in the Pantheon team - creators of Rastullahs Lockenpracht
User avatar
crioto
Halfling
Posts: 59
Joined: Fri Aug 11, 2006 8:34 pm
Location: Bishkek, Kyrgyzstan
Contact:

Post by crioto »

Okay! Let's look at my xml file:

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<GUILayout>
    <Window Type="DefaultWindow" Name="Tutorial Gui">
        <Window Type="TaharezLook/Button" Name="Quit">
             <Property Name="UnifiedPosition" Value="{{0.35,0},{0.45,0}}" />
             <Property Name="UnifiedSize" Value="{{0.3,0},{0.1,0}}" />
             <Property Name="Text" Value="THERE IS MUST BE CYRYLIC SYMBOLS" />
             </Window>
        </Window>
</GUILayout>
Now let's look on part of C++ code(where i trying to use XML file) :

Code: Select all

mEditorGuiSheet = CEGUI::WindowManager::getSingleton().loadWindowLayout((CEGUI::utf8*)"Tutorial Gui.xml");
		mGUISystem->setGUISheet(mEditorGuiSheet);
		CEGUI::PushButton* quitButton = (CEGUI::PushButton*)CEGUI::WindowManager::getSingleton().getWindow((CEGUI::utf8*)"Quit");
And when i starting my app i receive
Runtime Error!

This application has requested the Runtime to terminate it in an unusual way.

And for finish - above is part from CEGUI log:
(Error) Exception: ExpatParser::parseXMLFile - XML Parsing error 'not well-formed (invalid token)' at line 7
11/06/2007 20:38:47 (Error) WindowManager::loadWindowLayout - loading of layout from file 'Tutorial Gui.xml' failed.
Do your work, don't be stupid
User avatar
crioto
Halfling
Posts: 59
Joined: Fri Aug 11, 2006 8:34 pm
Location: Bishkek, Kyrgyzstan
Contact:

Post by crioto »

So, anyone can help me?
Do your work, don't be stupid
User avatar
Blakharaz
Gnoblar
Posts: 19
Joined: Wed Jun 02, 2004 8:51 pm
Location: Potsdam, Germany

Post by Blakharaz »

Are you sure you saved your XML file in UTF-8 encoding? On Windows you could use an editor like Notepad++ for converting.
Coder in the Pantheon team - creators of Rastullahs Lockenpracht
Post Reply