[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] encoding problem...
From: |
Antoine Leca |
Subject: |
Re: [Devel] encoding problem... |
Date: |
Mon, 13 Dec 2004 15:18:38 +0100 |
> 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