Reading Windows-1252 encoding in Windows Phone 8

浪子不回头ぞ 提交于 2019-11-30 23:58:02

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.

As the exception message so clearly told you, the framework subset on Windows Phone doesn't come with support for Windows-1252. As you say, using Latin-1 (ISO-8859-1) is a way to do it.

Alternatively you can implement the encoding manually, which I wouldn't recommend.

How about trying MultiByteToWideChar(Win32 API)?

Sample code is here.

http://bluewatersoft.cocolog-nifty.com/blog/2012/12/windows-phone-8.html

http://code.msdn.microsoft.com/wpapps/Windows-Phone-8-Shift-JIS-7ecd59fe/sourcecode?fileId=72228&pathId=1378915520

This is a samplle for CP-932(Shift JIS). Create a new "Windows Phone Runtime Component"(C++) project, then copy the code. Change the constant "CP_SJIS" for you, please.

In addition, I don't know whether CP-1252(Windows-1252) is effective on WP8.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!