Android Question Problem when importing a text file

park jae hyun

Member
Licensed User
Longtime User
Hello
Language = Korean
When you load a text file
edittext1.Text = File.ReadString (File.DirAssets, "test.txt")
⧫ ⧫ ⧫ hello ⧫ ⧫ ⧫ ⧫ ......
Appear.
English is well displayed.
Korean has broken out.
Help me ...
 

park jae hyun

Member
Licensed User
Longtime User
Your file is not encoded in UTF8. Using Notepad++ I see that it is encoded in Windows 949.

You can use this code:
B4X:
Dim tr As TextReader
tr.Initialize2(File.OpenInput(File.DirAssets, "test.txt"), "Windows949")
Log(tr.ReadAll)
tr.Close

Thank you very much.
Thank you very much.
Thank you very much.
 
Upvote 0
Top