4

嗨,我有一个在 windows xp pro、windows Visa、windows 7 上运行良好的应用程序

但是当我在嵌入的 windows xp 上运行它时它不起作用并给出以下错误:

EEncodingError - 无效的代码页

当应用程序是使用 Delphi 2006 制作时,它可以在 windows XP 嵌入式上运行

**当应用程序是用 Delphi 2010 制作的 **不能在 windows XP 嵌入式上运行****

4

2 回答 2

4

The TEncoding.ASCII property uses codepage 20127, which is not installed on XP Embedded by default. You have to install it manually. The TEncoding class does not exist in D2006.

Are you using Indy 10, by chance? It uses TEncoding.ASCII by default for its string encodings. This exact error has been known to occur when using Indy on XP Embedded.

于 2010-06-10T08:06:16.580 回答
0

什么时候崩溃?在启动时,还是稍后?

该错误仅在一个地方发现,至少在 RTL 中。在 SysUtils 中,constructor TMBCSEncoding.Create(CodePage, MBToWCharFlags, WCharToMBFlags: Integer);TEncoding 调用它来设置字符串编码。

它接受CodePage参数并在其上调用GetCPInfo,如果失败则引发此异常。从 MSDN 文档和异常消息中,可能发生的情况是您的应用程序正在尝试使用 XP Embedded 不支持的多字节字符集中的字符串。您是否对使用不同字母表的外语字符串或文本工作做任何不寻常的事情?

于 2010-06-09T16:51:39.043 回答