System.Text.Encoding.GetEncoding(“iso-8859-1”) throws PlatformNotSupportedException?

前端 未结 5 1865
我在风中等你
我在风中等你 2020-12-15 22:28

See subject, note that this question only applies to the .NET compact framework. This happens on the emulators that ship with Windows Mobile 6 Professional

5条回答
  •  执笔经年
    2020-12-15 23:22

    This MSDN article says:

    The .NET Compact Framework supports character encoding on all devices: Unicode (BE and LE), UTF8, UTF7, and ASCII.

    There is limited support for code page encoding and only if the encoding is recognized by the operating system of the device.

    The .NET Compact Framework throws a PlatformNotSupportedException if the a required encoding is not available on the device.

    I believe all (or at least many) of the ISO encodings are code-page encodings and fall under the "limited support" rule. UTF8 is probably your best bet as a replacement.

提交回复
热议问题