jinyistudio Well-Known Member Licensed User Longtime User May 20, 2021 #1 Hi When I use the following program to read a text file containing Chinese characters, strange codes appear in the Chinese characters. Is there a solution to this problem? B4X: File.ReadString(jyString.Slash($"${File.DirApp}${DownloadFolder}"$), filename)
Hi When I use the following program to read a text file containing Chinese characters, strange codes appear in the Chinese characters. Is there a solution to this problem? B4X: File.ReadString(jyString.Slash($"${File.DirApp}${DownloadFolder}"$), filename)
xulihang Well-Known Member Licensed User Longtime User May 20, 2021 #2 This should be an encoding problem. Check this: ICUB4J - detect character-encoding formats | B4X Programming Forum Upvote 0
This should be an encoding problem. Check this: ICUB4J - detect character-encoding formats | B4X Programming Forum
Erel B4X founder Staff member Licensed User Longtime User May 20, 2021 #3 I don't know where jyString.Slash comes from but you should remove it. B4X: File.ReadString(FileCombine(File.DirApp, DownloadFolder), Filename) Use Notepad++ to find the text encoding. You will then need to use TextReader with the correct encoding. Upvote 0
I don't know where jyString.Slash comes from but you should remove it. B4X: File.ReadString(FileCombine(File.DirApp, DownloadFolder), Filename) Use Notepad++ to find the text encoding. You will then need to use TextReader with the correct encoding.