mail-archives/mono-bugs/2006-February/039358.html

126 строки
5.4 KiB
HTML
Исходник Обычный вид История

2019-06-06 22:03:35 +03:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-bugs] [Bug 77482][Nor] Changed - DirectoryInfo.GetFiles()
failes with international characters
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%2077482%5D%5BNor%5D%20Changed%20-%20DirectoryInfo.GetFiles%28%29%0A%09failes%20with%20international%20characters&In-Reply-To=bug-77482%40chernobyl.ximian.com">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="039357.html">
<LINK REL="Next" HREF="039359.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-bugs] [Bug 77482][Nor] Changed - DirectoryInfo.GetFiles()
failes with international characters</H1>
<B>bugzilla-daemon at bugzilla.ximian.com</B>
<A HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%2077482%5D%5BNor%5D%20Changed%20-%20DirectoryInfo.GetFiles%28%29%0A%09failes%20with%20international%20characters&In-Reply-To=bug-77482%40chernobyl.ximian.com"
TITLE="[Mono-bugs] [Bug 77482][Nor] Changed - DirectoryInfo.GetFiles()
failes with international characters">bugzilla-daemon at bugzilla.ximian.com
</A><BR>
<I>Fri Feb 17 19:59:16 EST 2006</I>
<P><UL>
<LI>Previous message: <A HREF="039357.html">[Mono-bugs] [Bug 77586][Blo] Changed - Masterpages fail to find
their .master template when running in a sub directory
</A></li>
<LI>Next message: <A HREF="039359.html">[Mono-bugs] [Bug 77377][Min] Changed - dfcdsfcdsfcdsfcds
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#39358">[ date ]</a>
<a href="thread.html#39358">[ thread ]</a>
<a href="subject.html#39358">[ subject ]</a>
<a href="author.html#39358">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>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 <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">zac at zacbowling.com.</A>
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=77482">http://bugzilla.ximian.com/show_bug.cgi?id=77482</A>
--- shadow/77482 2006-02-06 10:29:18.000000000 -0500
+++ shadow/77482.tmp.10956 2006-02-17 19:59:16.000000000 -0500
@@ -1,12 +1,12 @@
Bug#: 77482
Product: Mono: Class Libraries
Version: 1.1
OS: unknown
OS Details:
-Status: NEW
+Status: ASSIGNED
Resolution:
Severity: Unknown
Priority: Normal
Component: System
AssignedTo: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at ximian.com</A>
ReportedBy: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">stonebone at planetunreal.com</A>
@@ -105,6 +105,40 @@
FileTest.exe bj&#246;rk
bj&#246;rk does not exist.
&quot;bj&#195;&#182;rk&quot; is &quot;bj&#246;rk&quot; encoded with UTF-8 (but the terminal is not using
UTF-8).
+
+------- Additional Comments From <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">zac at zacbowling.com</A> 2006-02-17 19:59 -------
+MONO_EXTERNAL_ENCODINGS isn't used for filenames however support for
+this in files should be added if the operating system will allow
+international file names.
+
+Currently the GetFileSystemEntries function calls to the private
+method System.IO.MonoIO.GetFileSystemEntries(...) which is an internal
+call back to ves_icall_System_IO_MonoIO_GetFileSystemEntries (after
+mapping) inside mono/mono/metadata/file-io.c.
+
+The path passed to the function is UTF-16 and that function in C calls
+'path = mono_string_to_utf8 (_path)' to map the string to utf8 every
+time.
+
+That utf-8 string is passed to mono_io_scandir(...) which is then
+simply passed to g_dir_open in glib. In the docs it says that the path
+variable of that function should be UTF-8 for win32, but the on disk
+encoding for any other system.
+<A HREF="http://developer.gnome.org/doc/API/2.0/glib/glib-File-Utilities.html#g-dir-open">http://developer.gnome.org/doc/API/2.0/glib/glib-File-Utilities.html#g-dir-open</A>
+
+Two solutions:
+We change this function to use the
+System.Text.Encoding.GetEncoding(...) functions to match to the system
+default locale (how ever we can get that). This method would make it
+so we are not dependent on ICONV.
+
+The secound method, we can pass the file name to the GLIB function
+g_filename_from_utf8 (...) and g_filename_to_utf8(...) and then the
+enviroment variable G_FILENAME_ENCODING could be used to specify the
+encoding of the filesystem.
+
+Example:
+export G_FILENAME_ENCODING=ISO-8859-1
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="039357.html">[Mono-bugs] [Bug 77586][Blo] Changed - Masterpages fail to find
their .master template when running in a sub directory
</A></li>
<LI>Next message: <A HREF="039359.html">[Mono-bugs] [Bug 77377][Min] Changed - dfcdsfcdsfcdsfcds
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#39358">[ date ]</a>
<a href="thread.html#39358">[ thread ]</a>
<a href="subject.html#39358">[ subject ]</a>
<a href="author.html#39358">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/mono-bugs">More information about the mono-bugs
mailing list</a><br>
</body></html>