[xsd-users] USING UTF-8 Encoding while generating XML , now need to give Support of UNICODE Characters in XML

Boris Kolpackov boris at codesynthesis.com
Thu Jan 4 09:11:51 EST 2024


Auti, Ajay <ajay.auti at siemens.com> writes:

> To Support this , I had tried to change --char-type char to
> --char-type wchar_t  type It changed my .cxx and .hxx files to wchar_t
> but my Code Synthesis library included files are not supporting wchar_t
> type.

They support both char and wchar_t but for wchar_t a number of macros
have to be defined to enable it. These macros are automatically defined
by the generated code before including the relevant libxsd headers so
if you don't include any of them directly, everything should work.

I suggest that you work out these issues using a simple examples,
say the `hello` example from the xsd-examples package. Change it
to use wchar_t and see if you still get errors that you get in your
application. If not, then the issue is most likely in your application
code.

See also:

https://codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/#3.2



More information about the xsd-users mailing list