intltool-extract does not decode XML special entities
Bug #1191978 reported by
Eloi Rivard
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
intltool |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
Hi,
This fails on Fedora 18, with intltool 0.50.2
Take a simple testcase:
= foobar.xml =======
<?xml version="1.0" encoding="UTF-8"?>
<_foo>></_foo>
=======
Run:
intltool-extract --type=
cat foobar.xml.h
And see:
= foobar.xml.h =======
char *s = N_(">");
=======
The ">" character should have been decoded before beeing exported in the .h file.
I could fix it by replacing "add_message(
Related branches
lp:~azmeuk/intltool/xmlfix
- intltool Developers: Pending requested
-
Diff: 12 lines (+1/-1)1 file modifiedintltool-extract.in (+1/-1)
To post a comment you must log in.
I don't think we should be decoding these entities, as the translations will be merged back into the XML file or built into separate XML files, and thus they must be encoded properly in those XML files. If we were to simply decode every entity, we would then need to maintain some sort of map somewhere, specific to the XML file they were read from, to be able to re-encode any entities, when we generate the translated files. I don't think it makes sense for intltool to be doing that work.
If there is a way we can automatically get it right every time, without maintaining such a mapping, then it might be acceptable.