升级到Delphi 6 - 兼容性问题之二

2008-04-10 02:58:17来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

一. 潜在的二进制Form文件的不兼容

过去,新版本Delphi创建的二进制Form文件(或称DFM文件)可以被老版本的Delphi读取。但是现在不行了。某些二进制Form文件可能不能被老版本正确的读取,其原因是Delphi 6内部的字符串的流化和原先不同。过去,流化操作假设一个本地特殊的字符集。而现在新的流化操作假设字符集为UTF-8。由此带来的问题就是,如果Delphi 6的二进制Form文件中包含有码值大于127的字符出现(比如版权符®),则该文件就不能被Delphi 的老版本正确读取。

如果你想在老版本的Delphi 中打开Delphi 6 Form文件,那么请先将该Form文件存为文本格式而非二进制格式。

Potential binary form file incompatibilities

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.

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:升级到Delphi 6 - 兼容性问题之一

下一篇:升级到Delphi 6 - 兼容性问题(中文全文)