Problem with accented letters

yaio

26-10-2009 16:29:34

Hello, when I execute the following code:
# -*- coding: utf-8 -*-
...
s = u'try: àèìòù'
print( s )
ogre.OverlayManager.getSingleton().getOverlayElement( 'DebugText' ).setCaption( s )

the print works correctly (printing try: àèìòù), but setCaption prints only try:
I need to print accented letters to translate my app. How can I resolve this? Thanks!

yaio

02-11-2009 15:17:17

Ok, now it works: I didn't know the code_points directive in the Ogre fontdef format. I made the assumption that the default behavoiur was to catch all character codes.

andy

03-11-2009 00:32:39

Can you post some sample code to help other people -- I'd looked at it and while I could make it work with CEGUI I wasn't sure how to do it with straight Ogre..

Andy

yaio

03-11-2009 09:00:01

Oh yes. Excuse me, you're right, maybe my phrase wasn't sufficient to help other people, I repair now.

I modify the fontdef file BlueHighway.fontdef adding the last line (i.e. code_points 33-255):

BlueHighway
{
type truetype
source bluehigh.ttf
size 32
resolution 55
code_points 33-255
}