Unicode: how to properly read and display directory entries?
Kagamin
spam at here.lot
Fri Nov 5 06:51:55 PDT 2010
Tyro[a.c.edwards] Wrote:
> Hello,
>
> What is the proper way to read a directory such that file names are not
> garbled? Here is the example I borrowed form the std.file documentation.
> Screen shots of folder is attached. Thanks.
>
> void main(string[] args)
> {
> bool callback(DirEntry* de)
> {
> if (de.isfile)
> mciPlay(toUTF8(de.name));
> return true;
> }
>
> listdir("snd", &callback);
> }
>
> D:\code>play
> snd\american.ogg
> snd\bigdog.flac
> snd\blackmail.mp3
> snd\ding.wav
> snd\kam.aif.aiff
> snd\豺。縺ã»ogg
>
http://d.puremagic.com/issues/show_bug.cgi?id=2742
More information about the Digitalmars-d-learn
mailing list