There is a question regarding the encoding as in What is character encoding and why should I bother with it. However, I still confuse with the encoding for the Windows system and file.
As I am working C# program on Visual Studio 2017, may I know how to convert the string that is input in the textbox to byte array and write it into a text file?
I am not writing the text to file is because I need the bytes value of the string as compression. For example:
Input : hello world
Bytes array that write to file: 罴讵8?瘈
Thank you for your time!
Encoding.UTF8.GetBytes(<string>)will get you the UTF8 bytes, use a different encoding if you need to趟%觍are not byte values (a byte has a numerical value between 0 and 255). These are just Chinese characters. Are you asking how to translate English to Chinese? Because if so, this is not about text encoding or byte values/arrays at all. You would need a language translation software with an English->Chinese dictionary to do that...