[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 09:55:22 EST 2010


Hello Boris,

About this....

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"?
>

You have right that this option it is setted to "No"
Not sure why but my mates told me that it is like this because of som
conflict with other library.

So do you think that is no other way to make it work without haveing to
change that setting?
I am also haveing a custom XercesC compiled, so maybe can be made some on
this library,
because I think the problem is come from here... ¿or not?

Thanks,
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