[Mono-bugs] [Bug 77394][Nor] New - Mono.Unix.Catalog broken under Windows

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Jan 28 14:13:00 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 kde at valkyrie.one.pl.

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

--- shadow/77394	2006-01-28 14:13:00.000000000 -0500
+++ shadow/77394.tmp.26308	2006-01-28 14:13:00.000000000 -0500
@@ -0,0 +1,64 @@
+Bug#: 77394
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: Windows XP SP2
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Mono.POSIX
+AssignedTo: miguel at ximian.com                            
+ReportedBy: kde at valkyrie.one.pl               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Mono.Unix.Catalog broken under Windows
+
+Description of Problem:
+The problem is occuring under Microsoft .NET with Mono.Posix.dll from
+http://forgeftp.novell.com/gtks-inst4win/Win32%20Runtime%20Installer/v2.7.1/gtksharp-runtime-2.7.1-win32-0.2.exe.
+I'm unable to run testcase using mono on windows, because it wants
+libc.so.6 instead of windows equivalent. When running in mono on linux all
+is ok.
+
+Consider following code:
+
+Catalog.Init("testcase",
+Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "locale"));
+Console.WriteLine(Catalog.GetString("Hello world!"));
+
+If current locale is pl, then it should look for file
+locale/pl/LC_MESSAGES/testcase.mo and write localised string. On linux it
+does look for that file and prints "Witaj świecie!", but on windows i18n is
+not working, the output is "Hello world!". Running filemon reveals that the
+real file the program is looking for is E/PL/LC_MESSAGES/t.mo. After
+renaming directory and the .mo file, so they can be found, output is still
+"Hello world!", but if using glade#, then strings from .glade file are in
+localised versions, so gettext is working correctly (probably because
+glade# is calling gettext from c code.)
+
+A quick look at
+http://svn.myrealbox.com/viewcvs/trunk/mcs/class/Mono.Posix/Mono.Unix/Catalog.cs?rev=55514&view=markup
+reveals that both Console.Init and Console.GetString are using
+UnixMarshal.StringToHeap function. It would be logical to assume, that if
+Console.Init passes "t" to bindtextdomain instead of "testcase", then
+Console.GetString tries to get "H" or some other junk from catalog instead
+of "Hello world!".
+
+Steps to reproduce the problem:
+1. Have Mono.Posix.dll working with Microsoft .NET,
+2. Unpack testcase.rar, change locale/pl to whatever language you are using,
+3. Run testcase.exe, preferably from command line, if you want to see any
+output,
+4. Google for filemon to see what files are being really opened.
+
+Actual Results:
+Non-localised version of string.
+
+Expected Results:
+Localised version of string.
+
+How often does this happen? 
+Every time.


More information about the mono-bugs mailing list