Windows Phone字符编码 [英] Windows Phone character-encoding

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

问题描述

我的代码是 Encoding.GetEncoding(iso-8859-9); 在我的Windows Phone项目。但是Windows Phone不支持iso-8859-9。如何解决这个问题?

My code is Encoding.GetEncoding("iso-8859-9"); in my Windows Phone project. But "iso-8859-9" is not supported on Windows Phone. How can I fix this problem?

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

我也找到这个链接,但我不知道如何使用它。

I also found this link but I don't know how to use it.

推荐答案

要使用程序,它将生成类如下:

To use the program, just type the encoding name and it will generate the class like so:

然后在某个地方创建一个文件(复制从程序生成的代码)并开始使用它:

Then make a file for the class somewhere (Copypaste the code generated from the program) and start using it:

//Instead of
Encoding enc = Encoding.GetEncoding("iso-8859-9");

//do this
Encoding enc = new ISO88599Encoding();
//Proceed exactly the same

生成的代码太长,无法复制您可以使用这些说明进行管理。

The code generated is too long to copypaste here but hopefully you manage with these instructions.

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

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