[Mono-dev] bug 3860 - DirectoryInfo.GetFileSystemInfos returns a subdirectory that has unicode chars with the incorrect name

Eberhard Beilharz eb1 at sil.org
Tue Mar 13 07:11:30 UTC 2012


Your output "looks" the same to me.

I'd think you need to normalize the strings before comparing them,
something like:

     if (!infos[0].Name.Normalize().Equals(UnicodeDirName.Normalize(), StringComparison.OrdinalIgnoreCase))
     {


Eberhard

Jared Watts wrote on 2012-03-12 at 20:11 +0100:
>
> I opened bug 3860 <https://bugzilla.xamarin.com/show_bug.cgi?id=3860>
> earlier today, but I'm curious if anyone on the dev list has run into
> a similar issue or knows of a workaround.
>
> https://bugzilla.xamarin.com/show_bug.cgi?id=3860
>
>  
>
> Basically, on Mac OS X, Directory.CreateDirectory is used to create a
> sub directory with Unicode chars in the path (???????).  When that
> directory is retrieved with DirectoryInfo.GetFileSystemInfos, the Name
> property is different than what it was created with.
>
>  
>
> The attached .out file has the output from the sample repro program
> after it was run on Mac OS X.
>
>  
>
> If you want to build the attached repro program:
>
> csc /t:exe /out:UnicodeFileRepro.exe Program.cs
>
>  
>
> Thanks for any debugging ideas/workarounds!
>
>  
>
> - jared
>
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120313/aab265b0/attachment.html>


More information about the Mono-devel-list mailing list