Android Question Encodage

Hirogens

Active Member
Licensed User
Longtime User
Hello, I would like to read a file. But in the french version I have some "é" and I don't know how to display that How can I do that =)
 

klaus

Expert
Licensed User
Longtime User
Where does the file come from?
To display special characters you need UTF-8 encoding.
If the file origin is Windows you can use TextReader with Windows-1252 encoding:
B4X:
Private txt As String
Private tr As TextReader
tr.Initialize2(File.OpenInput(File.DirAssets, "MyFile.txt"), "Windows-1252")
txt = tr.ReadAll
tr.Close
 
Upvote 0
Top