[patch] Garbage code in text string display
Guan Xin
guanx.bac at gmail.com
Sat Aug 18 09:42:59 CDT 2007
2007-08-18, Xin Guan, guanx.bac at gmail.com
This patch solves the problem that many MBCS programs display garbage code
for text strings. Because most windows programmers do not handle charsets
properly, we have to force DEFAULT_CHARSET in here.
-------------->8------------------
diff -Nru a/dlls/gdi32/font.c b/dlls/gdi32/font.c
--- a/dlls/gdi32/font.c 2007-08-11 00:18:12.000000000 +0800
+++ b/dlls/gdi32/font.c 2007-08-18 22:21:56.000000000 +0800
@@ -355,6 +355,8 @@
CHARSETINFO csi;
int charset = GetTextCharset(hdc);
+ if(charset == ANSI_CHARSET)
+ charset = DEFAULT_CHARSET;
/* Hmm, nicely designed api this one! */
if(TranslateCharsetInfo(ULongToPtr(charset), &csi, TCI_SRCCHARSET))
cp = csi.ciACP;
-------------->8------------------
More information about the wine-patches
mailing list