Skip to content

fix(jni): preserve Unicode across string and exception boundaries - #1098

Merged
andiwand merged 1 commit into
mainfrom
review/80-jni-unicode
Oct 5, 2026
Merged

andiwand merged 1 commit into
mainfrom
review/80-jni-unicode

Conversation

@andiwand

@andiwand andiwand commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Java exception messages now preserve supplementary Unicode characters instead of passing regular UTF-8 to JNI's modified-UTF-8 API. String conversion rejects unpaired Java surrogates, replaces invalid native UTF-8 scalar values, releases pinned strings on failure, and checks Java string/byte-array length conversions. Exception translation preserves an already pending Java exception and cannot unwind through JNI.

Validation: all 79 JNI tests pass. Extended existing logger and HTML-service checks; added one malformed-surrogate test that fails before the fix. A temporary native conversion harness passes 10 malformed/boundary UTF-8 cases. Clang-tidy reports the existing portability-template-virtual-member-function warning in exceptions.hpp.

@andiwand
andiwand force-pushed the review/79-python-test-concision branch from 3fbe25b to 0e29e22 Compare October 5, 2026 20:28
Base automatically changed from review/79-python-test-concision to main October 5, 2026 20:29
@andiwand
andiwand force-pushed the review/80-jni-unicode branch from 4f8c6ab to a77a232 Compare October 5, 2026 20:30
@andiwand
andiwand merged commit 22d8c7f into main Oct 5, 2026
22 of 23 checks passed
@andiwand
andiwand deleted the review/80-jni-unicode branch October 5, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant