Bug 313359 (MONO52105) - monoresgen produces invalid PO files (2)
Summary: monoresgen produces invalid PO files (2)
Status: RESOLVED FIXED
Alias: MONO52105
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2003-12-12 16:47 UTC by Bruno Haible
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
hello1.de.resx (german resource source code) (675 bytes, text/plain)
2003-12-12 16:48 UTC, Thomas Wiest
Details
hello2.de.resx (german resource source code) (663 bytes, text/plain)
2003-12-12 16:48 UTC, Thomas Wiest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:21:49 UTC


---- Reported by bruno@clisp.org 2003-12-12 09:47:15 MST ----

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:14 MST ----

Created an attachment (id=165301)
hello1.de.resx (german resource source code)




---- Additional Comments From bruno@clisp.org 2003-12-12 09:48:56 MST ----

Created an attachment (id=165302)
hello2.de.resx (german resource source code)




---- Additional Comments From miguel@ximian.com 2004-01-12 17:57:45 MST ----

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?



---- Additional Comments From gonzalo@ximian.com 2005-01-13 17:28:51 MST ----

Fixed

Imported an attachment (id=165301)
Imported an attachment (id=165302)

Unknown bug field "cf_version_details" encountered while moving bug
   <cf_version_details>mono 0.28</cf_version_details>
Unknown operating system SUSE 9.0. Setting to default OS "Other".