tis-620 to UTF8

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a bunch of text written in Thai using TIS-620 encoding. I need to
convert it to UTF8 in my C# program. (I need code, or a callable library, not
a program.) Can you point me to example code to do this?

Thanks
 
jdcharbonneau said:
I have a bunch of text written in Thai using TIS-620 encoding. I need to
convert it to UTF8 in my C# program. (I need code, or a callable library, not
a program.) Can you point me to example code to do this?

TIS-620 is code page 874 (according to a bit of research) so you can
do:

byte[] tis620 = ...; // However you obtain those bytes

byte[] utf8 = Encoding.Convert (Encoding.GetEncoding(874),
Encoding.UTF8,
tis620);
 
Thanks!

Jon Skeet said:
jdcharbonneau said:
I have a bunch of text written in Thai using TIS-620 encoding. I need to
convert it to UTF8 in my C# program. (I need code, or a callable library, not
a program.) Can you point me to example code to do this?

TIS-620 is code page 874 (according to a bit of research) so you can
do:

byte[] tis620 = ...; // However you obtain those bytes

byte[] utf8 = Encoding.Convert (Encoding.GetEncoding(874),
Encoding.UTF8,
tis620);
 
Back
Top