解决Delphi程序在非中文系统下乱码

在工程文件头加入 Windows引用

在begin后加入

SetThreadLocale(
    DWORD(Word(SORT_DEFAULT) shl 16) or
    DWORD(Word(SUBLANG_CHINESE_SIMPLIFIED) shl 10) or
    DWORD(Word(LANG_CHINESE))
    );

原理:设置程序的所在区域

方法来自互联网,备忘~

posted @ 2011-01-15 21:32  毛小毛  阅读(672)  评论(0编辑  收藏  举报