Hi there,

I wrote a C++ program that implements a menu that can be configured via an XML meant for an ARM board. I use directFB for graphical output. Basically, everything works fine, besides of drawing special characters (german umlauts in this case). If I'd use DrawGlyph, I'd get it to work via the characters index, but I'd like to use DrawString. According to the API, DrawString works with UTF-8, which sounds promising. Still, if I try to pass an umlaut, no matter whether I got it from a c++ string (using .c_str()-Member) or pass it directly as "ü" for instance, all I get is a square and if there's another character following the umlaut, it's not shown at all. So far, I wasn't able to find any information on the internet - it seems nobody else has this problem.

I can exclude the following reasons fo this problem:
- string axtraction from XML was incorrect; checked it via cout and everything was fine, passing an umlaut didn't work either as mentioned before
- font doesn't support the character; I'm using dejavu and it works fine with DrawGlyph using indices; also tried other fonts, but that didn't solve the problem either

As we couldn't get DirectFB 1.4 to work on our board, we use 1.3 there. However, same problem occurs with 1.4 on desktop pc.

I'm aware of differences between the encoding of default c-strings and UTF-8 (multibyte etc.) and tried around with those things. I found some code that should convert strings to utf-8 encoding, but still no luck. setlocal didn't help either. If there is such a huge work necessary just to print out umlauts and other special characters, I'd be happy if someone could add a conversion function to directfb or at least give a recommendation for another library in the reference manual.

Having spent some time on this, I'm somewhat frustrated - I'm starting to believe UTF means "Use The Force", which I'm unfortunately not capable of...

Regards

Daniel Kepes
  

Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!    
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to