Q: Can you give a simple example of such a program (preferably downloadable)? A: Yes. If you have Simplified Chinese environment, you can try: http://update.cz88.net/soft/qqwry.rar which is a freeware for IP address-to-geographical address translation. Before patching WINE, most (though not all) labels and all buttons show garbage code. None after.
Q:Can you add a conformance test showing that your patch is correct? A: I have tried editplus, acdsee, and gvim in en_US and zh_CN.GBK locale/encodings. They all ran well. I also tried the German version of winrar in de locale, no problem either. I don't think we need to prove this patch is correct because it is certainly wrong and introduced a bug. However, `any sufficiently advanced bug becomes a feature'. In the source code of Microsoft Windows NT/2k/XP, or to be excact, in the file "private/windows/shell/accesory/spechars/charmap.c" they confessed there is a bug in GDI that `assumes the font's default charset is always the system default locale'.
I know peeking into The source code is illegal, but I've only done this some 24 hrs after I submitted this patch. So this patch has nothing to do with my undesirable deed.
Xin
On 8/19/07, Dan Kegel dank@kegel.com wrote:
Xin Guan wrote:
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.
Can you give a simple example of such a program (preferably downloadable)?
Can you add a conformance test showing that your patch is correct?
- Dan