c# - Japanese characters Encoding Issues -
I am using a third party OCR library in which an image file has been converted to a text file in Japanese characters . When I open it by double clicking, the text file looks ok, but when I load it in the text box using code below it becomes strange
this. Textbox1.Text = file. Read all text (outpath);
Read Now can take encoding as a text parameter.
For a Japanese file you might use:
this.textBox1.Text = File.ReadAllText (Outpath, Encoding.Unicode); If your file is encoded in UTF 8:
this.textbox1.Text = file.ReadAllText (Outpath, Encoding.UTF8); Hope this helps,
Sylvain
Comments
Post a Comment