[Mono-bugs] [Bug 77394][Nor] Changed - Mono.Unix.Catalog broken
under Windows
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sat Jan 28 20:41:38 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 jonpryor at vt.edu.
http://bugzilla.ximian.com/show_bug.cgi?id=77394
--- shadow/77394 2006-01-28 14:13:33.000000000 -0500
+++ shadow/77394.tmp.28805 2006-01-28 20:41:38.000000000 -0500
@@ -1,14 +1,14 @@
Bug#: 77394
Product: Mono: Class Libraries
Version: 1.1
-OS:
+OS: unknown
OS Details: Windows XP SP2
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Normal
Component: Mono.POSIX
AssignedTo: miguel at ximian.com
ReportedBy: kde at valkyrie.one.pl
QAContact: mono-bugs at ximian.com
TargetMilestone: ---
@@ -64,6 +64,38 @@
Every time.
------- Additional Comments From kde at valkyrie.one.pl 2006-01-28 14:13 -------
Created an attachment (id=16412)
testcase
+
+------- Additional Comments From jonpryor at vt.edu 2006-01-28 20:41 -------
+The fix is in, it's just not in the installer. :-)
+
+Here's what's happening: the Mono.Unix.Catalog within
+gtksharp-runtime-2.7.1-win32-0.2.exe is an old version, before we got
+it working on Windows. In particular, the version within that
+installer uses System.Runtime.InteropServices.Marshal.StringToHGlobal
+to create the strings that are passed to "intl.dll." The problem is
+that on Mono, Marshal.StringToHGlobal is a UTF-8 conversion, while on
+.NET it converts the string into the user's locale.
+
+Because of this, the intl.dll will get invalid strings (it wants
+UTF-8, and it's not getting UTF-8), which is why the directories that
+filemon is listing are screwy. It's also why Catalog.GetString()
+doesn't give you anything sensible -- the message catalog is in UTF-8,
+but the strings .NET is passing to intl.dll!gettext are in your
+current code page, so they never match.
+
+The fix is simple: use a current Mono.Posix.dll, which always encodes
+strings as UTF-8 before passing them to intl.dll.
+
+That's easier said than done, though, since the newer Mono.Posix.dll
+Mono.Unix.Catalog depends on MonoPosixHelper.dll, which wasn't
+included in the gtksharp-runtime-2.7.1-win32-0.2.exe installer, so
+simply downloading a new Mono.Posix.dll won't help, you need both a
+new Mono.Posix.dll and a MonoPosixHelper.dll.
+
+paco has been alerted of this, so his next installer will include an
+updated Mono.Posix.dll and MonoPosixHelper.dll. Hopefully he'll be
+able to get a new installer out before leaving for 4 weeks of
+presentations...
More information about the mono-bugs
mailing list