fix: bundle Unicode::UTF8 (Java XS) for jcpan#748
Merged
Conversation
- Add Java XS module UnicodeUTF8 (DFA align with Unicode-UTF8 0.70) and ship Unicode/UTF8.pm for XSLoader. - Fix Encode::_utf8_on to flip SvUTF8 without decoding bytes; add RuntimeScalar.utf8UncheckedOctets so encode_utf8 can validate raw octets only for that case (t/090, t/200_leaks). - Use WarningBitsRegistry call-site bits for utf8 warn/die from Java XS so Test::Fatal + FATAL utf8 works (t/090 decode). - pack: surrogate code points from pack U; allow U template up to 0x7FFFFFFF in character mode (t/060, t/080). - decode fallback chunks: one output character per returned octet (t/120). Generated with [Cursor](https://docs.cursor.com) Co-Authored-By: Cursor <noreply@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.pm+ three XS entry points (decode_utf8,encode_utf8,valid_utf8).Encode::_utf8_onsemantics, pack("U", …) for surrogates and large UVs, decode fallback chunk handling, and FATALutf8when XS runs in Java (call-site warning bits viaWarningBitsRegistry)../jcpan -t Unicode::UTF8runs the full 11241-test suite successfully; prerequisite noise from Devel::AssertC99 / Devel::CheckCompiler may still appear when CPAN tries to build real XS.Test plan
make(unit tests)timeout 600 ./jcpan -t Unicode::UTF8→ Unicode-UTF8Result: PASS/ “All tests successful”t/060_surrogates.t,t/080_super.t,t/090_non_shortest_form.t,t/120_fallback.t,t/200_leaks.tunderjperl -Ilib -It