Skip to content

ClobConsumer replaces characters split across 256-character chunks with '??' #1478

Closed

Description

@jbonofre

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.

Activity

  1. added
    Type: bug
    on Nov 15, 2026
  2. added this to the 20.0.0 milestone on Nov 15, 2026
  3. added a commit that references this issue on Nov 16, 2026
  4. added a commit that references this issue on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions