[xsd-users] xml_schema::Date and xml_schema::Time are wrong serialized on UNICODE files

Constantin Iacobescu sir.costy at gmail.com
Mon Nov 22 10:48:44 EST 2010


Hi Boris,

About the test project ...


> Can you make sure that in your project's properties "C/C++" / "Language"
> tab the "Treat wchar_t as Built-in Type" property is set to "Yes"?
>
> If this doesn't help, then I will still need the minimal test case
> that reproduces this problem. Right now all I do is guess what might
> be the problem.
>

Just have finish the test and look to give me the same error on file write.
And this only when the "Treat wchar_t as Built-in Type" property is set to
"No"
I also use a statically compiled lib of XercesC, and this is compiled the
same.


So there is any way to can work in this case too?

If you want I can send you the ptroject but it is a bit bigger for the
staticaly xercesc (~22M)

Best Regards,
Constantin


On Mon, Nov 22, 2010 at 2:33 PM, Boris Kolpackov <boris at codesynthesis.com>wrote:

> Hi Constantin,
>
> Constantin Iacobescu <sir.costy at gmail.com> writes:
>
> > If you look in the xml file I have sent to you and look at it in a hex
> > editor you will see that if you are converting that strange values from
> > hex to dec you will get the good value of them
>
> I have an idea about what might be going on. Some of the values in
> the xml_schema::date type are of the unsigned short type. If wchar_t
> is defined as a typedef, then it will most likely be to this type as
> well. As a result, when you insert unsigned short to std::wostream,
> it is treated as a character rather than as an integer value.
>
> Can you make sure that in your project's properties "C/C++" / "Language"
> tab the "Treat wchar_t as Built-in Type" property is set to "Yes"?
>
> If this doesn't help, then I will still need the minimal test case
> that reproduces this problem. Right now all I do is guess what might
> be the problem.
>
> Boris
>



-- 
Constantin Iacobescu


More information about the xsd-users mailing list