RE: [xml] Wrong entity reference



Stupid me... Thanks a lot for the explanation. Using UTF8Toisolat1() did
the trick.

Thanks again,

Daniel

-----Original Message-----
From: xml-admin gnome org [mailto:xml-admin gnome org] On 
Behalf Of Christopher R. Maden
Sent: Monday, 01 April, 2002 01:29
To: xml gnome org
Subject: Re: [xml] Wrong entity reference


----====--=-=--=-==--==--==-===-=-===---=-====--==
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
Content-Transfer-Encoding: quoted-printable

At 15:27 31/3/02, Daniel Gehriger wrote:
I need to include a degree sign (=B0) in an attribute. I tried both 
(encoding UTF-8)

 <foo label=3D"360=B0+/>

and

 <foo label=3D"&#0176;/>

but xmlGetProp() always returns

 "360=C2=B0" (that is, "360" + 'A' with a circumflex + degree sign).

Is there anything I'm missing ?

Yes: UTF-8.  If you used UTF-8 in your first example, but 
looked at it with= =20 a Unicode-unaware editor, you'd see 
<foo label=3D"360=C2=B0"/>.

xmlGetProp() is returning 360=B0, encoded as UTF-8, and 
you're looking at it= =20 byte-by-byte instead of 
character-by-character.

~Chris
--=20
Christopher R. Maden, Principal Consultant, crism consulting 
DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training
<URL: http://crism.maden.org/consulting/ >
PGP Fingerprint: BBA6 4085 DED0 E176 D6D4  5DFC AC52 F825 
AFEC 58DA ----====--=-=--=-==--==--==-===-=-===---=-====--==
Content-Type: application/pgp-signature

-----BEGIN PGP MESSAGE-----
Version: PGP Personal Privacy 6.5.8

iQA/AwUBPKeb0KxS+CWv7FjaEQLxWACglMauwGufPAhVf1etj3MV8sMfaIgAoP6K
6HYlP+2ssdlJUSfC+T+TkAjR
=gEpf
-----END PGP MESSAGE-----

----====--=-=--=-==--==--==-===-=-===---=-====--==--





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]