i have a textfile in utf-8 and this code but the list is not sorted. (7.80)
i put a A at top of the file and a Z an the end.
B4X:
Dim problems As List = File.ReadList(File.DirAssets,"problems.txt")
problems.Sort(True)
Dim i As Int
For i = 0 To problems.Size-1
Log(problems.Get(i))
Next
I've talked about this exact issue in one of the first videos. Your file is encoded in UTF8 with BOM.
Use a decent text editor such as Notepad++ and encode it in UTF8 without BOM.
thank you, i put an empty row first. we faced this BOM issue also in batch files not long ago.
i watched all of your videos, i will watch again ... its part of videos "Strings"
correct, at least with a dummy line my first entry with A is at top in my sort
it was just a manual input in editor. i will make a feature request at ms.
i can also use notepadd++ where i make this app.
maybe i will put my lists into a sqllite db later on.
i avoid generally downloading apps from web that use admin permissions at install. and without permissions they have my user permissions. why i can not open/edit this textfile in the ide editor?
if you drag a textfile on this ide link it got the filename and its ignored. the open menü not support .txt