[xml] Hello!. About encoding



Hello everybody!,

I´m trying to use libxml2 to parse driving-tests
written in Spanish (ISO-8859-1), to an ncurses app
written in C.

Because of trying to do something that´s gonna be easy
to use for the final user, I´ve just avoided the use
of name-spaces, leaving my xml-file like this:

<question>
 <title>some spanish text</title>
 <option>some option</option>
 <correct-option>some other option</correct-option>
</question>

Oviously, when trying to parse this file back to the
app., I don´t get proper spanish´ punctuation marks as
cutes, tildes, etc.

I´ve been trying to reuse some source-code from
examples that came with my libxml2-2.2.69, like
testWriter.c, but it always returns me a: conversion
unsuccesful!.

So, since I´m not a proper programmer, and you api
specs seems quite complicated to me, I haven´t got and
haven´t seen anywhere from where to start doing this,
at the time that I´m asking myself this questions:

If I have a xml file with ISO-8859-1 characters (not
at node-name level), when I parse this file, libxml2
will translate them to utf-8, but will do it
correctly?, I mean.

If I just apply something like utf8toLatin1 just
within the output is ok?

Is there any working example that I could look at, so
I   could reuse this code?

Thanks very much, and sorry because of my english.

Kind Regards,



        
        
                
______________________________________________ 
Renovamos el Correo Yahoo! 
Nuevos servicios, más seguridad 
http://correo.yahoo.es



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