Strange directory output, isn't the same?
Posted: Sun Aug 20, 2017 5:13 pm
Hi there,
I have 4 files in a directory on Windows 7 64bit English:
franç.txt
franš.txt
franþ.txt
ranã.txt
In a normal directory via windows standard explorer or Total Commander they are listed exactly in that order assumingly sorted alphabetically, while purebasic's Examinedirectory manages to shift the 2 middle ones, so they appear like this:
franç.txt
franþ.txt
franš.txt
ranã.txt
I'm trying with both PB5.60 (unicode) and PB5.31 both same result.
All chars are within 0-255 ASCII Range.
ç = $E7 = 231
š = $9A = 154
þ = $FE = 254
ã = $E3 = 227
How can this happen? Doesn't Purebasic read the directory as each item comes along? In that case both listings should be the same?
Why are 154 and 254 flipped in PureBasic's output?
I used the standard ExamineDirectory() example from PureBasic help. It should be noted that issuing a "DIR" command in a standard windows console outputs the same as Purebasic does, where the 2 middle items are flipped.
I have 4 files in a directory on Windows 7 64bit English:
franç.txt
franš.txt
franþ.txt
ranã.txt
In a normal directory via windows standard explorer or Total Commander they are listed exactly in that order assumingly sorted alphabetically, while purebasic's Examinedirectory manages to shift the 2 middle ones, so they appear like this:
franç.txt
franþ.txt
franš.txt
ranã.txt
I'm trying with both PB5.60 (unicode) and PB5.31 both same result.
All chars are within 0-255 ASCII Range.
ç = $E7 = 231
š = $9A = 154
þ = $FE = 254
ã = $E3 = 227
How can this happen? Doesn't Purebasic read the directory as each item comes along? In that case both listings should be the same?
Why are 154 and 254 flipped in PureBasic's output?
I used the standard ExamineDirectory() example from PureBasic help. It should be noted that issuing a "DIR" command in a standard windows console outputs the same as Purebasic does, where the 2 middle items are flipped.