Re: [xml] nbsp entity



On Wed, Oct 13, 2004 at 12:56:51AM +0200, Motieun wrote:
when I'm trying to parse html content that contains the sequence of
characters &nbsp, it is translated into 0xc2 0xa0 (in hex), which make
the browser display invalid characters in the html page.
My question is: how can libxml parser ignore that translation routine
of reference entity and leave it as it is?

  No. &nbsp, == "0xc2 0xa0" in UTF-8. If the browser doesn't display
it correctly:
   - either the browser is broken w.r.t. UTF-8 support (unlikely)
   - the encoding information wasn't passed down properly to the browser

 Read http://xmlsoft.org/encoding.html , and reread it until you fully
understand why it's not a libxml2 problem.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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