Reputation: 11763
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****
Upvotes: 4
Views: 1962
Reputation: 598414
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.
Upvotes: 4
Reputation: 84650
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?
Upvotes: 0