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

Auti, Ajay ajay.auti at siemens.com
Wed Jan 10 01:54:42 EST 2024


Hi Team , I am try to run Hello example as you suggested.

  1.  Found lots of linking errors please check below attached image .

  *   Visual studio Empty project with (libxerces-c-3.2.4+2-x86_64-windows10-msvc17.6) and (libxsd-4.2.0-windows) versions

[cid:image001.png at 01DA43BF.66C4D0C0]



  1.  Please help me with a number of macros have to be defined to enable wchar_t .

  *   I am using below macros :

"xsd cxx-tree --namespace-map --generate-serialization --proprietary-license --char-type wchar_t --char-encoding auto"



Can you please mentioned me defined macrosto enable wchar_t



Thanks ,

Ajay



-----Original Message-----
From: Boris Kolpackov <boris at codesynthesis.com>
Sent: Thursday, January 4, 2024 7:42 PM
To: Auti, Ajay (ADV D IN MO RI-PS SYS ES-ET) <ajay.auti at siemens.com>
Cc: xsd-users at codesynthesis.com
Subject: Re: [xsd-users] USING UTF-8 Encoding while generating XML , now need to give Support of UNICODE Characters in XML



Auti, Ajay <ajay.auti at siemens.com<mailto: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://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcodesynthesis.com%2Fprojects%2Fxsd%2Fdocumentation%2Fcxx%2Ftree%2Fguide%2F%233.2&data=05%7C02%7Cajay.auti%40siemens.com%7Cbcc67c7cd2d1497cdd8808dc0d2f1c38%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638399743214202390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Ck8DiT4TI2%2Bh0pocXALtvJ%2F7dQbepQhB3nVJnYVi8Dc%3D&reserved=0<https://codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/#3.2>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 201912 bytes
Desc: image001.png
Url : https://codesynthesis.com/pipermail/xsd-users/attachments/20240110/e584e247/image001-0001.png


More information about the xsd-users mailing list