[Mono-bugs] [Bug 77664][Nor] New - GetDirectories and localized directory names

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Feb 28 11:18:57 EST 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by c.renglet at nirond.be.

http://bugzilla.ximian.com/show_bug.cgi?id=77664

--- shadow/77664	2006-02-28 11:18:57.000000000 -0500
+++ shadow/77664.tmp.8787	2006-02-28 11:18:57.000000000 -0500
@@ -0,0 +1,84 @@
+Bug#: 77664
+Product: Mono: Class Libraries
+Version: 1.1
+OS: other
+OS Details: Mandriva 2006
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: c.renglet at nirond.be               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: GetDirectories and localized directory names
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+Can't recursively scan directories with international characters in their names
+
+Steps to reproduce the problem:
+1. create directory structure with names containing localized characters
+(as in french)
+eg : 
+mkdir /tmp/test/abcdéfg
+mkdir /tmp/test/abcdéfg/èèè
+2. 
+copy and compile the code :
+using System;
+using System.IO;
+
+public class Test {
+	static void Main(string [] args)
+	{
+		string sDir = "/tmp/test";
+		string[] directories = Directory.GetDirectories(sDir);
+		foreach (string ssdir in directories) {
+			Console.WriteLine (ssdir);
+			string [] subdirs = Directory.GetDirectories(ssdir);
+			foreach(string subdir in subdirs) {
+				Console.WriteLine("\t"+subdir);
+			}
+		}
+		Console.WriteLine("\r\nFiles : ");
+		string [] filenames = Directory.GetFiles(sDir);
+		foreach (string filename in filenames) {
+			Console.Write(filename);
+			FileStream fs = File.OpenRead(filename);
+			Console.WriteLine (" len=" + fs.Length);
+			fs.Close();
+		}
+
+3. run.
+
+Actual Results:
+
+Unhandled Exception: System.IO.IOException: Win32 IO returned
+ERROR_GEN_FAILURE. Path: /tmp/test/abcdéf
+in <0x00415> System.IO.Directory:GetFileSystemEntries (System.String path,
+System.String pattern, FileAttributes mask, FileAttributes attrs)
+in <0x00011> System.IO.Directory:GetDirectories (System.String path,
+System.String pattern)
+in <0x0003d> System.IO.DirectoryInfo:GetDirectories (System.String pattern)
+in <0x0000f> System.IO.DirectoryInfo:GetDirectories ()
+in (wrapper remoting-invoke-with-check)
+System.IO.DirectoryInfo:GetDirectories ()
+in <0x001fe> Test:Main (System.String[] args)
+
+
+Expected Results:
+work
+
+How often does this happen? 
+every time under mono 1.1.13 on a Mandriva 2006
+works under mono 1.1.10 but localized characters are'nt wel displayed
+
+Additional Information:
+I've tried with and without setting MONO_EXTERNAL_ENCODINGS=iso8859-1.
+Without this, the GetFiles report a message in standard error saying I must
+use the environment variables mentionned.
+With DirectoryInfo structures, it is the same result as above.


More information about the mono-bugs mailing list