没有数据可用于编码1252-Xamarin [英] No data available for encoding 1252 - Xamarin
本文介绍了没有数据可用于编码1252-Xamarin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Xamarin开发Android应用程序,同时尝试将文本转换为 byte []
时出现以下错误:
没有数据可用于编码1252
我的代码:
byte [] mybyteA = Portable.Text.Encoding.UTF8.GetBytes(mystring);
Mono.Security.Cryptography.SHA224Managed sha22 =新的_Mono.Security.Cryptography.SHA224Managed();
byte [] hash = sha22.ComputeHash(mybyteA);
解决方案
Android项目,请选中项目属性-> Android Build -> 链接器下的 west
来包含它。 strong>-> 国际化:
I am using Xamarin to develop an Android app, while trying to convert text to byte[]
I get the following error:
no data is available for encoding 1252
My code:
byte[] mybyteA= Portable.Text.Encoding.UTF8.GetBytes(mystring);
Mono.Security.Cryptography.SHA224Managed sha22 = new _Mono.Security.Cryptography.SHA224Managed();
byte[] hash = sha22.ComputeHash(mybyteA);
解决方案
The Western Code page (1252) isn't being bundled into your final IPA/APK.
For iOS projects, include it by checking west
under Project Properties -> iOS Build -> Internationalization:
For Android projects, include it by checking west
under Project Properties -> Android Build -> Linker -> Internationalization:
这篇关于没有数据可用于编码1252-Xamarin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文