-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.2.2
-
x86
-
windows_nt
Name: clC74495 Date: 12/22/99
Symptom: An SQL string that contains a Kanji character is truncated at
illegal position. It seems to me that the JdbcOdbcObject.CharsToBytes()
method doesn't copy all converted characters into the byte array that is
returned to the caller. The method copies the converted characters into the
byte array by calling
System.arraycopy(outBUf, 0, tRetBytes, retBytes.length,
toBytes.nextCharIndex());.
However, the System.arraycopy method copies only a part of characters if an
SQL string contains a Kanji character, because the number of characters is
specified as the number of bytes to be copied. Please remember that the some
character encodings require multiple number of bytes for a character. For
instance, the Shift JIS encoding requires two bytes for a Kanji character.
(Review ID: 99237)
======================================================================
- duplicates
-
JDK-4215746 sun.jdbc.odbc.JdbcOdbcObject.CharsToBytes lose converted bytes for Japanese
- Closed