[Gambas-user] Problem with Conv() and XmlWrite
Doriano Blengino
doriano.blengino at ...1909...
Tue Dec 23 08:24:36 CET 2008
Luigi Carlotto ha scritto:
> I have forgotten to add the rest of the error message, but it is
> identical to the first one post.
>
> encoding error: output conversion failed two to conv error, bytes 0xE5
> 0x31 0x32 0xE5 I/O error: encoder error
> Error: Given Error writing XML
> Tails: -1
>
> The string does not contain characters of control (es. LineFeed).
>
>
The hexadecimal bytes are clear enough to me: 0x31 is a "1", 0x32 a "2",
and 0xE5 is *not* an ascii character but, in Unicode, a lowercase "A"
with a small circle above it (don't know how to name it).
This could be a date in italian/european format, like 25-12-2008 or
25/12/2008 (Christmas). I have seen that browsers, which can display
different character sets, sometimes display a strange character instead
of the normal one for the apostrophe. This can happen to dashes or
hyphens and, who knows, to other characters too. It remember that was
caused by an incorrect implementation of ISO-8859-xx.
One quick way to verify this is to change the date, for example to
02-01-2009, and run the test again: if the hex bytes come out like 0xE5
0x30 0x31 0xE5, then this is the problem. Or, using a more scientific
test like Benoit suggested, do an hexdump and see if there are strange
characters: chars less than 0x20 are not good, and so are those greater
than 0x7f.
Supposing that this is the problem, I don't know what to say anymore - a
bad encoding implementation (mysql or gambas fault) or bad
pairing/coupling of encodings (programmer's fault) has to be found
somewhere...
Cheers,
--
Doriano Blengino
"Listen twice before you speak.
This is why we have two ears, but only one mouth."
More information about the User
mailing list