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


Question

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 SDK as well as on my English HTC Touch Pro (all .NET CF 3.5). iso-8859-1 stands for Western European (ISO), which is probably the most important encoding besides us-ascii (at least when one goes by the number of usenet posts).

I'm having a hard time to understand why this encoding is not supported, while the following ones are supported (again on both the emulators & my HTC):

  • iso-8859-2 (Central European (ISO))
  • iso-8859-3 (Latin 3 (ISO))
  • iso-8859-4 (Baltic (ISO))
  • iso-8859-5 (Cyrillic (ISO))
  • iso-8859-7 (Greek (ISO))

So, is support for say Greek more important than support for German, French and Spanish? Can anyone shed some light on this?

Thanks!

Andreas

1
14
12/29/2008 8:50:14 PM

I would try to use "windows-1252" as encoding string. According to Wikipedia, Windows-1252 is a superset of ISO-8859-1.

System.Text.Encoding.GetEncoding(1252)
15
12/29/2008 9:15:23 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon