DELPHI:EEncodingError - 嵌入式 Windows XP 上的代码页无效

发布于 2024-09-04 13:08:19 字数 262 浏览 2 评论 0原文

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

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

EEncodingError - 无效的代码页

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

**当应用程序使用 Delphi 2010 制作时,它**不能在嵌入式 Windows XP 上运行****

Hi I have a application that works well on
windows xp pro, windows Visa, windows 7

But when I run it on windows xp embedded it does not work
and gives the following error:

EEncodingError - Invalid code page

When the App was made with Delphi 2006 it work on windows XP embedded

**When the App is made with Delphi 2010 it does **not work on windows XP embedded****

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

池木 2024-09-11 13:08:19

TEncoding.ASCII 属性使用代码页 20127,默认情况下 XP Embedded 上未安装该代码页。您必须手动安装它。 D2006 中不存在 TEncoding 类。

您偶然使用 Indy 10 吗?默认情况下,它使用 TEncoding.ASCII 进行字符串编码。已知在 XP Embedded 上使用 Indy 时会发生此确切错误。

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.

美人骨 2024-09-11 13:08:19

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

该错误仅在一处发现,至少在 RTL 中。在 SysUtils 中,构造函数 TMBCSEncoding.Create(CodePage, MBToWCharFlags, WCharToMBFlags: Integer); 由 TEncoding 调用以设置字符串编码。

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

When does it crash? On startup, or later?

That error is only found in one place, in the RTL at least. In SysUtils, constructor TMBCSEncoding.Create(CodePage, MBToWCharFlags, WCharToMBFlags: Integer);, which gets called by TEncoding to set up string encodings.

It takes the CodePage parameter and calls GetCPInfo on it, and if it fails it raises this exception. From the MSDN documentation and the exception message, what's probably going on is that your app is trying to use strings from a multibyte character set that's not supported by XP Embedded. Are you doing anything unusual with strings or text work in foreign languages that use a different alphabet?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文