如何在3.5紧凑框架中进行编码 [英] How to do encoding in 3.5 compact framework

查看:80
本文介绍了如何在3.5紧凑框架中进行编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述







使用以下代码:

Encoding.GetEncoding(936);在紧凑的框架上



936是中文的代码页。



结果:不支持平台例外。



您能否建议一些样本用于执行不同语言的编码,例如

简体中文,日文,意大利文和韩文等。

Hi,


Used the following code:
Encoding.GetEncoding(936); on compact framework

936 is code page for chinese language.

Result: Getting the Platform not supported exception.

Can you suggest some sample for performing encoding in different languages like
simplified chinese , japanese, italian anad korean etc.

推荐答案

请参阅我对该问题的评论。代码示例对您没有帮助;特别是你没有解释你想要做什么。如果某些平台不支持某些内容,则不支持;你只能1)改变这个平台; 2)在该平台上做一些不同的事情。



真正可以帮助你的是批评你自己的问题。您需要解释您的目标,精确制定您想要做的事情,提供准确的异常信息等等。



您的一般问题是:您可能正在尝试在基于Unicode的平台上使用过时(非UTF)编码,在您使用的平台上也不支持。你也应该明白,没有奇迹这样的事情。 :-)



请参阅MSDN帮助页面上有关方法的异常信息:

http://msdn.microsoft.com/en-us/library/wzsz3bk3%28v=vs.110%29。 aspx [ ^ ]。

参见: http://msdn.microsoft.com/en-us/library/system.notsupportedexception%28v=vs.110%29.aspx [ ^ ]。



-SA
Please see my comment to the question. A code sample won't help you; especially you did not explain what you are trying to do. If something is not supported on some platform, it is just not supported; you only can 1) change this platform; 2) do something different on that platform.

What really could help you is looking critically at your own questions. You need to explain your goals, formulate what you want to do precisely, provide precise exception information, and so on.

You general problem is: you are probably trying to use obsolete (non-UTF) encoding on a Unicode-based platform, which also is not supported on the platform you are using. You should also understand that there is no such thing as miracle. :-)

Please see exception information on the MSDN help page on the method:
http://msdn.microsoft.com/en-us/library/wzsz3bk3%28v=vs.110%29.aspx[^].
See also: http://msdn.microsoft.com/en-us/library/system.notsupportedexception%28v=vs.110%29.aspx[^].

—SA


这篇关于如何在3.5紧凑框架中进行编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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