[xsd-users] XML encoding
yianisn at gmail.com
Fri Mar 2 08:26:43 EST 2007
thank you very much for your prompt reply!
I guess the standard Xerces library that I downloaded along with XSD does
not suport iso-8859-7 since I get an empty file when I call
project (ofs, p, map, "ISO8859-7");
The problem I am trying to solve has to do with Greek character (hence the
When I run xsd with the default char size I get an exception
invalid_utf8_string from string.ixx when I use Greek characters in string
fields. When I use wchar_t it works fine, but the output is UNICODE and not
viewable by notepad etc.
Q1: If Xerces recognized the iso8859-7 and I used wchars, then would I get
the correct output in iso8859-7 and not Unicode?
Q2: If I compile XSD with XSD_USE_LCP defined, would I be able to enter
Greek characters in standard char mode without getting the exception
thank you in advance!
Greek Characters, just in case you would like to test something (-:
abcdezh iklmn oprstu xy
On 3/2/07, Boris Kolpackov <boris at codesynthesis.com> wrote:
> Hi Yianis,
> Yianis Nikolaou <yianisn at gmail.com> writes:
> > I would like to stream a XML tree to a file with encoding iso-8859-7
> > I currently use the following procedure
> > ......
> > std::ofstream ofs ("result.xml");
> > xml_schema::namespace_infomap map;
> > project (ofs, p, map);
> > The generated file using Unicode encoding (UTF-8). Is there a way to
> > change that?
> Yes, by passing "ISO8859-7" to the serialization function:
> project (ofs, p, map, "ISO8859-7");
> This is documented in the Section 4.2, "Namespace Infomap and Character
> Encoding" of the C++/Tree Mapping Manual:
> Also note that depending on how you've built Xerces-C++ this encoding
> may not be supported. But I am pretty sure you will get it if you
> build Xerces-C++ with ICU.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.5 (GNU/Linux)
> -----END PGP SIGNATURE-----
More information about the xsd-users