On Wednesday, January 14, 2015 at 8:40:31 AM UTC+10, Steven G. Johnson 
wrote:
>
> Thanks for the clarification regarding the Unix situation.
>
> On Tuesday, January 13, 2015 at 4:31:51 PM UTC-5, Milan Bouchet-Valat 
> wrote:
>>
>> So the best solution for Julia is to return it as a UTF8String, knowing 
>> that in some cases invalid UTF-8 may appear. 
>
>
> (This is what Julia does now, it looks like.)
>

Which can present problems if the UTF8String is displayed or otherwise used 
where valid UTF8 is required. 

As Milan says Linux treats filenames as null terminated strings of bytes, 
so Linux can mix up its own filenames, and when you mount a windows volume 
on Linux all bets are off, you are playing guess the codepage :)

Maybe readdir should in fact return a raw bytestring as advertised in the 
documentation 
http://docs.julialang.org/en/release-0.3/stdlib/io-network/?highlight=readdir#Base.readdir

Cheers
Lex

Reply via email to