Problem while encoding string

I am developing an application where at some point I need a coded byte stream based on this user output.

Sort of

Encoding sysEncode = System.Text.Encoding.GetEncoding(850);
byte[] dataToEncrypt = sysEncode.GetBytes(m_oStrActivation);

However, when I retrieve a string from a byte stream, I get an encrypted string as

W?????e?????W?X????;??2????W???????@

Is there a way (coding type / equivalent) that I can limit these question marks and allow only simple scrambled alphanumeric characters?

+3
source share
1 answer

m_oStrActivation "", , - /. , . - - .

Base64, Convert.ToBase64String().

+1

Source: https://habr.com/ru/post/1732971/


All Articles