memo如何使用GB18030字符集以及如何测试它可支持Unicode(100分)

  • 主题发起人 主题发起人 xiang_de
  • 开始时间 开始时间
X

xiang_de

Unregistered / Unconfirmed
GUEST, unregistred user!
memo如何使用GB18030字符集以及如何测试它可支持Unicode
 
我原先用的是GB2312字符集但不知如何使用GB18030字符集以及如何测试它可支持Unicode
 
设置 Font.charset ,不知你的 gb18030 是哪种?

ANSI_CHARSET 0 ANSI characters.
DEFAULT_CHARSET 1 Font is chosen based solely on Name and Size. If the described font is not available on the system, Windows will substitute another font.
SYMBOL_CHARSET 2 Standard symbol set.
MAC_CHARSET 77 Macintosh characters. Not available on NT 3.51.
SHIFTJIS_CHARSET 128 Japanese shift-jis characters.
HANGEUL_CHARSET 129 Korean characters (Wansung).
JOHAB_CHARSET 130 Korean characters (Johab). Not available on NT 3.51

GB2312_CHARSET 134 Simplified Chinese characters (mainland china).
CHINESEBIG5_CHARSET 136 Traditional Chinese characters (taiwanese).
GREEK_CHARSET 161 Greek characters. Not available on NT 3.51.
TURKISH_CHARSET 162 Turkish characters. Not available on NT 3.51
VIETNAMESE_CHARSET 163 Vietnamese characters. Not available on NT 3.51.
HEBREW_CHARSET 177 Hebrew characters. Not available on NT 3.51
ARABIC_CHARSET 178 Arabic characters. Not available on NT 3.51

BALTIC_CHARSET 186 Baltic characters. Not available on NT 3.51.
RUSSIAN_CHARSET 204 Cyrillic characters. Not available on NT 3.51.
THAI_CHARSET 222 Thai characters. Not available on NT 3.51
EASTEUROPE_CHARSET 238 Includes diacritical marks for eastern european countries. Not available on NT 3.51.
OEM_CHARSET 255 Depends on the codepage of the operating system.


procedure TForm1.Button1Click(Sender: TObject);
begin
//在Mome1 中放几行中文字,然后执行下面的就能看出效果!
memo1.Font.Charset:=CHINESEBIG5_CHARSET
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
memo1.Font.Charset:=GB2312_CHARSET
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
memo1.Lines.Add(wideString('这里测试UniCode'));
end;
 
在系统上装上GB18030字符集补丁,自然就有了。
那个东西得到微软网站上下载
 
在winxp系统上装了GB18030字符集补丁:Microsoft GB18030 Support Package;
但在memo1.Font.charset中仍然找不到GB18030字符集。
 
到微软网站查查这个常量GB18030?
 

Similar threads

D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
后退
顶部