[xsd-users] Serialization issue with Latin characters

Justin Jose justinjose12002 at gmail.com
Fri Sep 2 07:24:04 EDT 2011


Thanks alot Boris, It worked.

Sure i will remember to CC  xsd-users.

Thanks
Justin

On 2 September 2011 01:54, Boris Kolpackov <boris at codesynthesis.com> wrote:

> Hi Justin,
>
> In the future please keep your replies CC'ed to the xsd-users
> mailing list as discussed in the posting guidelines:
>
> http://www.codesynthesis.com/support/posting-guidelines.xhtml
>
> Justin Jose <justinjose12002 at gmail.com> writes:
>
> > Hi Boris,
> >
> > Thanks alot for your quick reply.
> >
> >
> > I tried with the option --char-encoding iso8859-1 and also
>  --char-encoding
> > lsp
> > I am not getting the exception now. But the string is still not proper.
> the
> > é is coming as junk.
> >
> > <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
> > <Sample>
> >  <Id="Union pour le financement d'Immeubles de Sociétés" />
> > </Sample>
>
> This is actually the correct encoding of 'é' in UTF-8. See that
> encoding="UTF-8" attribute in the XML declaration? That means the
> document is in UTF-8 even though your application internally is
> using ISO8859-1. Generally, the input XML encoding, application
> encoding, and output XML encoding can all be different.
>
> If you want your XML to also be in ISO8859-1 (by default it is
> UTF-8), you will need to specify this encoding when calling one
> of the serialization functions, for example:
>
> root (std::cout, obj_model, map, "ISO8859-1");
>
> Boris
>
> [The rest of the original email follows for context.]
>
> >
> >  Didnt find any other encode header files under cxx/xml.
> >
> > Another way i can get the correct string?
> >
> > Thanks in advance.
> > Justin
>


More information about the xsd-users mailing list