123123213weqw opened a new pull request, #7325:
URL: https://github.com/apache/rocketmq-dashboard/pull/7325

   Fixes #7273.
   
   `RocketMQDLQProvider.normalizeFailureReason` enforced the 256-unit reason 
budget with `length()`/`substring(0, 253)` — a UTF-16 code-unit cut that splits 
a supplementary character whose high surrogate lands on the boundary into a 
lone surrogate with no UTF-8 encoding, rendering mojibake in the resend failure 
report.
   
   The count and cut now go through the repository's existing code-point-safe 
utility (`TextBounds`, the precedent the issue cites), keeping the 256 limit, 
whitespace normalization and `...` suffix semantics unchanged. Red-first: two 
regression tests place U+1F600's high surrogate exactly on the cut — one per 
message on the selected-message path, one on the range path — both fail on the 
old code with a mid-character value and pass asserting the exact 256-code-point 
reason with no surrogate (0xD800–0xDFFF) surviving. `RocketMQDLQProviderTest` 
69/69, `RocketMQDLQPayloadBudgetTest` 13/13.
   


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