[Tux4kids-commits] r835 - tuxtype/trunk/src
dbruce-guest at alioth.debian.org
dbruce-guest at alioth.debian.org
Sat Jan 10 20:15:09 UTC 2009
Author: dbruce-guest
Date: 2009-01-10 20:15:09 +0000 (Sat, 10 Jan 2009)
New Revision: 835
Modified:
tuxtype/trunk/src/alphabet.c
Log:
adaptation of ConvertToUTF8() so it works correctly in WIN32 with 16-bit wchar_t
Modified: tuxtype/trunk/src/alphabet.c
===================================================================
--- tuxtype/trunk/src/alphabet.c 2009-01-10 18:57:22 UTC (rev 834)
+++ tuxtype/trunk/src/alphabet.c 2009-01-10 20:15:09 UTC (rev 835)
@@ -831,14 +831,16 @@
//Microsoft uses a different wchar_t from the rest of the world - grrr...
#ifdef WIN32
- conv_descr = iconv_open("UTF8", "UTF16LE");
+ conv_descr = iconv_open("UTF-8", "UTF-16LE");
#else
- conv_descr = iconv_open("UTF8", "UTF32");
+ conv_descr = iconv_open("UTF-8", "UTF-32");
#endif
bytes_converted = iconv(conv_descr,
&wchar_t_Start, &in_length,
&UTF8_Start, &out_length);
+ LOG("completed iconv()\n");
+
iconv_close(conv_descr);
UTF8_word[0] = 0;
@@ -1329,7 +1331,8 @@
map_keys(wtmp,&keyboard_list[key]);
}
-
+/* FIXME get rid of UTF8 conversion - the unicode value is just a uint16, we should */
+/* definitely be able to figure out how to get it written into a file -DSB */
void savekeyboard(void)
{
unsigned char fn[FNLEN];
More information about the Tux4kids-commits
mailing list