> Which is exactly correct.  It's only confusing to those who don't
> understand that not all characters/character sets encode characters
> with single-byte encodings.

It's confusing because the "n" represents a buffer size. Even allocating
four bytes you cannot store 1 "character" because a character is such a
confusing word to begin with. Is "é" a "character"? What if I store it as
U+0065 U+0301? That's two Unicode codepoints for one logical character.

> The cause of the problem here is not the length of the data stored
> but that the client is set to expect single-byte encoding (by using
> character set NONE)

I agree that's a problem, however I disagree that the server should be
returning four bytes when the UTF-8 encoded value of "e" (or whatever ASCII
character you like) is only one byte long.

What I mean is, even if you changed the connection string character set to
"UTF8", 0x65 0x00 0x00 0x00 represents four UTF-8 characters (that is,
U+0065 U+0000 U+0000 U+0000).

Dean.




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to