jbonofre opened a new issue, #1478: URL: https://github.com/apache/arrow-java/issues/1478
### Describe the bug, including details regarding any error messages, version, and platform. `ClobConsumer` (JDBC adapter) reads a CLOB in chunks of 256 characters with `Clob.getSubString()` and encodes each chunk to UTF-8 on its own. When a character outside the Basic Multilingual Plane (an emoji, for example) is split across two chunks, its high surrogate ends one chunk and its low surrogate starts the next. Each lone surrogate is then encoded as `?`, so the character is silently replaced with `??`. For example, a CLOB of 255 `a` followed by 😀 (U+1F600) reads back as 255 `a` followed by `??`: 257 bytes instead of 259. This affects both `NullableClobConsumer` and `NonNullableClobConsumer`, and predates #1231, which was being reviewed when it was found. Expected: the value reads back unchanged. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
