I have some data encoded in ISO-8859-6, which I am reading from a bar-code scanner using a serial port. How do I map this ISO-8859-6 data into Unicode characters?
Use System.Text.Encoding.GetEncoding()
to get a System.Text.Encoding
object for ISO-8859-6, either
System.Text.Encoding.GetEncoding("ISO-8859-6")
Or
System.Text.Encoding.GetEncoding(28596)
And then you can pass your encoded ISO-8859-6 bytes to the object's GetString()
or GetChars()
method.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.