Bugzilla – Bug 313359
monoresgen produces invalid PO files (2)
Last modified: 2007-09-15 21:24:23 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".