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:
In Visual Studio, you must go to the properties window of each project:
iOS
You must scroll down until 'west'
Android
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With