Gentoo Archives: gentoo-dev

From: "Jan Kundrát" <jkt@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] UTF-8 in GLEP56 use flags?
Date: Thu, 02 Oct 2008 06:29:17
Message-Id: 48E46A35.7020001@gentoo.org
In Reply to: Re: [gentoo-dev] UTF-8 in GLEP56 use flags? by Ben de Groot
1 Ben de Groot wrote:
2 > The xml header in each metadata.xml states that the content is UTF-8
3 > encoded, and any XML parser has to be able to handle this. Also, when
4 > used literally in xml, the 5 special characters & ' " < > cause a
5 > well-formedness error, as far as I know.
6
7 You're wrong, it's absolutely safe to use ' and " in element contents.
8 You might have to escape them when in attribute value, though -- example:
9
10 <foo bar="baz &quot; test"/>
11
12 That's because the XML parser would have no way of telling if the " is
13 supposed to terminate the attribute value or not.
14
15 > of using the apostrophe. So in my opinion, if we want to use xml, we
16 > should use unicode properly.
17
18 In my opinion, there's absolutely no benefit in using fancy characters
19 everywhere, just because it's allowed by the XML spec.
20
21 Cheers,
22 -jkt
23
24 --
25 cd /local/pub && more beer > /dev/mouth

Attachments

File name MIME type
signature.asc application/pgp-signature