1. Change the encoding to URF-8, if this file is only one original file which you don't reuse as it is.
You can di it with notapad++.
2. You can use TextReader with TextReader.Initialize2(File.OpenInput(File.DirAssets, "EPREUVE.txt", "Windows-1252").
Then you can :
- Read the whole text with TextReader.ReadAll
- Read line by line with TextReader.ReadLine, something like this:
Private txr As TextReader
txr.Initialize2(File.OpenInput(File.DirAssets, "EPREUVE.txt"), "Windows-1252")
Private line As String
line = txr.ReadLine
Do While line <> Null
Log(line)
line = txr.ReadLine
Loop
- Read a List with TextReader.ReadList
Be aware that if you need to save the file again with ANSI you would need to use TextWriter.
This is explained in the
B4X Basic Language booklet chapter
4.12.6 Text encoding.
Et c'est aussi expliqué en français dans le livret
B4X Langage Basic chapitre
4.12.6 Encodage de texte.