Hi Flavio, On Wed, Jul 11, 2012 at 12:24 PM, Flávio Alberto <flavioalsoa...@gmail.com> wrote: > Hello, > > I'm trying to run dfbtest_font from DirectFB-1.4.11 with a string using > encoding format ISO8859-15 on Ubuntu 10.10 (UTF-8 by default), > to do this I change dfbtest_font.c on line 186 to this : >
My personal solution for this problem is to translate every string I want to draw with DirectFB. I do this with a C++ function like this: (I snipped part of it) char* ISO8859_15_To_UTF8(const char* chrInText) { const unsigned char* in = (const unsigned char*)chrInText; string str = ""; int i = 0; while (in[i] != '\0') { switch (in[i]) { case 0xa1: str += "¡"; break; case 0xbf: str += "¿"; break; case 0xc0: str += "À"; break; case 0xc1: str += "Á"; break; // // Fill the rest ..... case 0xfe: str += "þ"; break; case 0xff: str += "ÿ"; break; default: str += in[i]; break; } i++; } // Warning: user must free this return strdup(str.c_str()); } _______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev