var I:integer; begin for i:= 20000 to 80000 do if widechar(i)='我' then memo1.Lines.Add (inttostr(i)+'=我') else if widechar(i)='的' then memo1.Lines.Add (inttostr(i)+'=的') else if widechar(i)='窗' then memo1.Lines.Add (inttostr(i)+'=窗') else if widechar(i)='体' then memo1.Lines.Add (inttostr(i)+'=体'); end; 结果: 20307=体 25105=我 30340=的 31383=窗
Delphi6帮助里有这么一段话,看看就明白区别了。 你可以到大富翁里找个转换Form的工具。In the past, binary form files (or DFM files) created with newer versions of Delphi could be read by older versions. This is no longer true in Delphi 6; some binary form files may be read incorrectly because of the way that Delphi 6 performs internal string streaming. In the past, streaming was performed assuming a locale specific character set. Now streaming assumes that the character set is UTF-8. As a consequence, if there are characters with a code greater than 127 (such as the copyright symbol ? in a Delphi 6 binary form file, that file cannot be read by older versions of Delphi.If you intend to use a Delphi 6 form file (including older form files imported into and modified with Delphi 6) in an older version of Delphi, the file should be saved in text format instead of binary format.
http://www.csdn.net/Develop/article/17%5C17152.shtm
sourcestring
xxCaption = '标题' ;
xx.Caption := xxCaption ;我遇到过这样的情况,还好问题不是特严重,直接在记事本里改过来了。
这些是中文才会出现,不过不影响我编译啊,只要不用到D7独有的控件,用低版本的Delphi还是可以编译的啊
如果还不行
那就不行了
低版本兼容高版本,No Way !
I:integer;
begin
for i:= 20000 to 80000 do
if widechar(i)='我' then
memo1.Lines.Add (inttostr(i)+'=我')
else if widechar(i)='的' then
memo1.Lines.Add (inttostr(i)+'=的')
else if widechar(i)='窗' then
memo1.Lines.Add (inttostr(i)+'=窗')
else if widechar(i)='体' then
memo1.Lines.Add (inttostr(i)+'=体');
end;
结果:
20307=体
25105=我
30340=的
31383=窗
你可以到大富翁里找个转换Form的工具。In the past, binary form files (or DFM files) created with newer versions of Delphi could be read by older versions. This is no longer true in Delphi 6; some binary form files may be read incorrectly because of the way that Delphi 6 performs internal string streaming. In the past, streaming was performed assuming a locale specific character set. Now streaming assumes that the character set is UTF-8. As a consequence, if there are characters with a code greater than 127 (such as the copyright symbol ? in a Delphi 6 binary form file, that file cannot be read by older versions of Delphi.If you intend to use a Delphi 6 form file (including older form files imported into and modified with Delphi 6) in an older version of Delphi, the file should be saved in text format instead of binary format.
我写了一个“字符及汉字编码查询器”for 98 xp,也能根据编码(10和16进制)来反查汉字和字符,不知对你是否有用?
在D6中将.dfm文件以.txt文件保存
在d5转过来