Character Codes


Encoding is the process of transforming a set of Unicode characters into a sequence of bytes.
Decoding is the process of transforming a sequence of encoded bytes into a set of Unicode characters.



Encoding



Remove all the non UTF8 characters from a string.
You can use encoding which is the process of transforming a set of Unicode characters into a sequence of bytes.


string textAfter = System.Text.Encoding.UTF8.GetString(textBefore); 



GetBytes

This encodes a set of characters into a sequence of bytes.

byte[] bytes = System.Text.Encoding.Default.GetBytes(textBefore); 



Decoding




© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext