Re: [xml] Letters french people love so much...



On Wed, Mar 06, 2002 at 07:47:56PM +0100, Antoine Rennuit wrote:
Hello,
I am not really good at XML as you'll see, but I'm getting better
everyday...
Well, my problem is I would like to insert letters french people like so
much, such as accented a, or e, so I tried "xmlEncodeEntitiesReentrant"; but
when I read the document with an XML viewer I get the following :

  <?xml version="1.0" encoding="ISO-8859-1" ?>
- <DOCUMENTATION>
- <CLASSE>
  <NOM>Nom_de_classe</NOM>
  </CLASSE>
- <CLASSE>
  <NOM>Nom_de_classe_2</NOM>
  </CLASSE>
- <CLASSE>
  <NOM>Try : ??&, ù...</NOM>
  </CLASSE>
  </DOCUMENTATION>

that is not exactly what I intended to get :
there is a line which is <NOM>Try : ??&, ù...</NOM>, and I would like it to
be "Try : a, e , & , u", where "a", and "e" are accented...

What should I do?

  Start by reading the documentation, if you didn't:
    http://xmlsoft.org/encoding.html

Then you should know taht the internal representation is in UTF8 so if you
build or modify a tree (whcih you didn't tell but I tried to guess) then
convert the external ISO-8859-1 into UTF8 wich can be inserted in the tree:
   isolat1ToUTF8 ():
   http://xmlsoft.org/html/libxml-encoding.html#ISOLAT1TOUTF8

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.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]