jokerzsd opened a new pull request, #4226:
URL: https://github.com/apache/rocketmq-dashboard/pull/4226

   ## Summary
   
   Fix message property values being truncated mid-surrogate-pair, producing 
unpaired surrogates.
   
   ## Problem
   
   `MessagePropertyDisplay.abbreviate` used UTF-16 `length()`/`substring(0, 
1024)`. When the boundary fell between the high and low surrogate of a 
supplementary character (e.g. an emoji), the truncated value contained an 
unpaired surrogate and rendered as a replacement character.
   
   ## Fix
   
   Count code points (`codePointCount`) and truncate at a code-point boundary 
(`offsetByCodePoints`). `hasOversizedProperty` is updated to the same 
code-point semantics for consistency.
   
   ## Test plan
   
   Added a regression test (1023 ASCII chars + emoji straddling the boundary). 
`mvn test -Dtest=MessagePropertyDisplayTest` — 6 tests, 0 failures.
   
   Fixes #4167


-- 
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]

Reply via email to