You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "alhudz (via GitHub)" <gi...@apache.org> on 2026/06/20 13:59:13 UTC
[PR] keep initials from splitting a supplementary code point [commons-lang]
alhudz opened a new pull request, #1722:
URL: https://github.com/apache/commons-lang/pull/1722
Repro: `WordUtils.initials("Ben 😀mile Lee")` where the second word begins with U+1F600.
Cause: the loop copies the first `char` after a delimiter and skips the rest of the word, so a word that starts with a supplementary code point keeps only the high surrogate and the low half is dropped, leaving a lone surrogate in the result (`B` + U+D83D + `L`).
Fix: copy the trailing low surrogate together with its high half, and size the buffer to the input length so a two-`char` initial cannot run past it. BMP input is unchanged.
--
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-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Keep initials from splitting a supplementary code point [commons-lang]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #1722:
URL: https://github.com/apache/commons-lang/pull/1722#issuecomment-4759171494
@alhudz
Would please check the Commons Lang version of this class for the same issue?
TY!
--
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-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Keep initials from splitting a supplementary code point [commons-lang]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory merged PR #1722:
URL: https://github.com/apache/commons-lang/pull/1722
--
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-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] keep initials from splitting a supplementary code point [commons-lang]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #1722:
URL: https://github.com/apache/commons-lang/pull/1722#issuecomment-4758386103
@alhudz Please see my comment https://github.com/apache/commons-lang/pull/1719#pullrequestreview-4537228565
--
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-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org