kiddos opened a new pull request, #1392: URL: https://github.com/apache/commons-lang/pull/1392
We sometimes need to store Unicode text in a fixed space (e.g., in a database column of type `CHARACTER(32)`). It's acceptable for the text to be truncated, but because we're dealing with Unicode, we can't simply treat the text as raw bytes and truncate it at 16 bytes — that might split a character in the middle. The function `StringUtils.truncateToByteLength(String str, int maxBytes, Charset charset)` helps handle this by safely truncating the string based on byte length while preserving valid character boundaries. -- 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: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org