[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetype-devel
Subject:    Re: [Devel] encoding problem...
From:       "Antoine Leca" <Antoine-Freetype () Leca-Marti ! org>
Date:       2004-12-13 14:18:38
Message-ID: 005001c4e11e$a6904e00$46c86464 () arcesa ! com
[Download RAW message or body]

> I'm reading in an XML file encoded in UFT-8. It's got German
> characters in it like ö, ä and ü. When I print it out to std::cout it
> displays the characters right, if I pass it through Freetype and
> display it on a 3D-surface I get strange characters on the screen,
> where the German characters should appear.

You do the conversion from UTF-8 to UTF-32, don't you?

Freetype expects Unicode codepoints, NOT UTF-8 ones. So to get a ö (Unicode
0xF6), you need to ask for the glyph mapped at 0xF6. And in the xml file,
where you are seeing one character, there are actually two codepoints, first
being 0xC3, second being 0xB6 (if I am not mistaken.)


Antoine


_______________________________________________
Devel mailing list
Devel@freetype.org
http://www.freetype.org/mailman/listinfo/devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic