[Mono-bugs] [Bug 679735] New: Access to assembly configuration file fails when path contains national language characters
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Mar 15 08:45:44 EDT 2011
https://bugzilla.novell.com/show_bug.cgi?id=679735
https://bugzilla.novell.com/show_bug.cgi?id=679735#c0
Summary: Access to assembly configuration file fails when path
contains national language characters
Classification: Mono
Product: Mono: Runtime
Version: 2.10.x
Platform: x86
OS/Version: Windows 7
Status: NEW
Severity: Normal
Priority: P5 - None
Component: misc
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: horst at kakuschke.de
QAContact: mono-bugs at lists.ximian.com
Found By: Customer
Blocker: ---
Created an attachment (id=419404)
--> (http://bugzilla.novell.com/attachment.cgi?id=419404)
Patch file for gfile-posix.c
This is a follow-up to Bug 673793
(https://bugzilla.novell.com/show_bug.cgi?id=673793).
While loading of assemblies in directories containing national language
characters now works fine, the assembly config files still can not be accessed
when running under Windows.
Reading application config files uses eglib's function g_file_get_contents() in
gfile-posix.c - here we also have the problem with UTF8-encoded filenames.
To fix this, I applied unicode conversion and file opening using _wopen() for
windows to gfile-posix.c :
g_file_get_contents ( ... )
...
+#ifdef _MSC_VER
+ {
+ gunichar2* utf16_filename = u8to16 (filename);
+ fd = _wopen ((wchar_t *)utf16_filename, OPEN_FLAGS);
+ g_free (utf16_filename);
+ }
+#else
fd = open (filename, OPEN_FLAGS);
+#endif
...
Patch file is attached.
Thanks,
Horst Kakuschke
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list