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

Constantin Iacobescu sir.costy at gmail.com
Fri Nov 19 10:02:37 EST 2010


Yes, it's really weird.. actually if I look on debugger I can see that the
strange characters look the same.
Let say what you see in the file is the integer or short interpreted like a
char value.

Here is attached a basic xml exported from a test app.
I use the latest XSD binary and m working on windows and VS2008

The real code I used before discover the error was some like this:

signed short year = 2010;
signed char month = 12;
signed char day = 12;
signed char month = 12;

signed char hour = 14;
signed char min = 35;
signed char sec = 42;

std::auto_ptr<LandXML> objLandXML ( new LandXML(xml_schema::Date(year,
(unsigned short)month, (unsigned short)day),


xml_schema::Time((unsigned short)hour, (unsigned short)min, (unsigned
short)sec),

           L"1.2"));


And in this way I could see in debugger that the reinterpreted value of
month, day, hour, etc to a char is looking the same like in xml file.






On Fri, Nov 19, 2010 at 3:44 PM, Boris Kolpackov <boris at codesynthesis.com>wrote:

> Hi Constantin,
>
> Constantin Iacobescu <sir.costy at gmail.com> writes:
>
> > And what I get in to the file it is this:
> > [...]
> > date="2010-0-0 "
> > time="0 :0#:42"
>
> Hm, this is strange. The symbols that you get are probably different
> from what I see in the email because of the mail client conversions.
> Can you create a small but complete test case (schema, driver, and
> makefile/project file) that reproduces this problem (you can use
> one of the examples as a base). Also, which compiler/platform are
> you using?
>
> Boris
>



-- 
Constantin Iacobescu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestLandXML.xml
Type: text/xml
Size: 339 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20101119/d3cf93d5/TestLandXML.bin


More information about the xsd-users mailing list