[Mono-bugs] [Bug 52105][Nor] New - monoresgen produces invalid PO files (2)

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 12 Jan 2004 17:57:45 -0500 (EST)


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 miguel@ximian.com.

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

--- shadow/52105	2004-01-12 17:57:45.000000000 -0500
+++ shadow/52105.tmp.27828	2004-01-12 17:57:45.000000000 -0500
@@ -0,0 +1,106 @@
+Bug#: 52105
+Product: Mono/Compilers
+Version: unspecified
+OS: SUSE 9.0
+OS Details: 
+Status: NEEDINFO   
+Resolution: 
+Severity: Unknown
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bruno@clisp.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: monoresgen produces invalid PO files (2)
+
+Description of Problem: 
+monoresgen produces invalid PO files. 
+ 
+ 
+Steps to reproduce the problem: 
+Install mono-0.28 and gettext >= 0.11.5. 
+Store hello1.de.resx and hello2.de.resx (attached). 
+$ monoresgen hello1.de.resx de.po 
+$ cat de.po 
+$ msgcat de.po 
+$ monoresgen hello2.de.resx de.po 
+$ cat de.po 
+$ msgcat de.po 
+ 
+ 
+Actual Results: 
+$ monoresgen hello1.de.resx de.po 
+$ cat de.po 
+msgid "Hello World!" 
+msgstr "Hallo "Welt!"" 
+ 
+$ msgcat de.po 
+de.po:2: keyword "Welt" unknown 
+de.po:2:20: syntax error 
+msgcat: found 2 fatal errors 
+ 
+$ monoresgen hello2.de.resx de.po 
+$ cat de.po 
+msgid "Hello World!" 
+msgstr "Hallo 
+Welt!" 
+ 
+ 
+ 
+$ msgcat de.po 
+de.po:3: end-of-line within string 
+de.po:3: keyword "Welt" unknown 
+de.po:3:5: syntax error 
+de.po:4: end-of-line within string 
+msgcat: found 4 fatal errors 
+ 
+ 
+ 
+Expected Results: 
+$ monoresgen hello1.de.resx de.po 
+$ cat de.po 
+msgid "Hello World!" 
+msgstr "Hallo \"Welt!\"" 
+$ msgcat de.po 
+msgid "Hello World!" 
+msgstr "Hallo \"Welt!\"" 
+$ monoresgen hello2.de.resx de.po 
+$ cat de.po 
+msgid "Hello World!" 
+msgstr "Hallo\nWelt!" 
+$ msgcat de.po 
+msgid "Hello World!" 
+msgstr "" 
+"Hallo\n" 
+"Welt!" 
+ 
+ 
+ 
+How often does this happen?  
+Reproducible. 
+ 
+ 
+Additional Information: 
+ 
+The PO file format is specified in the GNU gettext documentation, section 'PO 
+Files' and 'Header Entry'. Special characters need to be escaped when put 
+into PO files.
+
+------- Additional Comments From bruno@clisp.org  2003-12-12 09:48 -------
+Created an attachment (id=6211)
+hello1.de.resx (german resource source code)
+
+
+------- Additional Comments From bruno@clisp.org  2003-12-12 09:48 -------
+Created an attachment (id=6212)
+hello2.de.resx (german resource source code)
+
+
+------- Additional Comments From miguel@ximian.com  2004-01-12 17:57 -------
+I could not find a precise specification, other than it is escaped
+like C.  But I did some guess-work, and handle \r, \n, \a, and "
+
+Is this enough?