Wang1rrr opened a new issue, #7001: URL: https://github.com/apache/rocketmq-dashboard/issues/7001
### Description `AiRunExecutor` limits persisted terminal errors with `String.substring`, counting UTF-16 code units. A valid provider error containing a supplementary character at the 1,000-character message boundary is cut between its surrogate pair. The run repository then receives a string that cannot be encoded as valid UTF-8. The same helper handles the 64-character error code. Errors consisting of supplementary characters are also truncated even when they fit in the database's character budget (for example, 750 emoji become 500). ### Reproduction Have the stub provider fail with an error message of 999 ASCII characters, one emoji, and a suffix. Run it through `AiRunExecutor` and inspect the persisted run update: `StandardCharsets.UTF_8.newEncoder().canEncode(errorMessage)` is false. ### Expected behavior Keep supplementary characters whole and use the existing code-point-aware `TextBounds` helper, while retaining the current error field limits and blank/trim behavior. ### Validation Three regression cases fail against the current base: emoji and CJK extension boundary cases, and a 750-code-point message that should fit. They pass with the candidate fix. This reproduction checks the repository arguments and UTF-8 encodability; it does not use a live MySQL server. -- 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]
