在Windows Phone 8中阅读Windows-1252编码 [英] Reading Windows-1252 encoding in Windows Phone 8

查看:142
本文介绍了在Windows Phone 8中阅读Windows-1252编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows中,我可以通过.NET使用Encoding.GetEncoding(Windows-1252)来检索Windows-1252代码页编码。不幸的是,此调用在Windows Phone 8仿真器中抛出一个ArgumentExtception,指定编码名称无效。我环顾MSDN,但没有找到任何有用的东西。有没有人知道Windows Phone 8中哪些编码可用,哪个是Windows-1252编码的新名称?是的,我知道使用iso-8859-1编码的替代选项,并手动替换129-159范围内的字符。但是,如果可能的话我试图避免这种情况。



非常感谢,Michael

解决方案

我不知道这是否仍然有效,但记住它是有用的。这个工具生成单字节代码页的源代码



http://www.hardcodet.net/2010/03/silverlight-text-encoding-class-generator



希望生成的源代码在基类库的windows phone子集中起作用。


In Windows, I can use the Encoding.GetEncoding ("Windows-1252") via .NET to retrieve the "Windows-1252" code page encoding. Unfortunately, this call throws an ArgumentExtception in Windows Phone 8 emulator, specifying that the encoding name is not valid. I looked around MSDN but didn't find anything useful. Does anyone know about which encodings are available in Windows Phone 8 and which is the new name of the "Windows-1252" encoding?

And yes, I am aware of the alternative option of using the "iso-8859-1" encoding and manually substituting the characters in the 129-159-range. But I'm trying to avoid that if possible.

Many thanks, Michael

解决方案

I am not sure this still works but remember it was useful. This tools generates the source code for a single byte code pages

http://www.hardcodet.net/2010/03/silverlight-text-encoding-class-generator

I hope the generated source works in windows phone subset of the base class library.

这篇关于在Windows Phone 8中阅读Windows-1252编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆