D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 23250 - Unicode regional indicators are not paired correctly
Summary: Unicode regional indicators are not paired correctly
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 All
: P1 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2022-07-15 13:59 UTC by Ate Eskola
Modified: 2022-07-18 08:06 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Ate Eskola 2022-07-15 13:59:55 UTC
If there are many flags side-by-side, they should count as a grapheme each. But regional indicators do not currently get paired like that. Due to that, "πŸ‡¬πŸ‡§πŸ‡­πŸ‡°πŸ‡ΈπŸ‡¬πŸ‡―πŸ‡ͺπŸ‡°πŸ‡Ύ".byGrapheme.walkLength returns 1 when it should return 5.
Comment 1 Dlang Bot 2022-07-15 14:05:20 UTC
@dukc created dlang/phobos pull request #8510 "Fix issue 23250 - corrected reginal indicator pairing." fixing this issue:

- Fix issue 23250 - corrected reginal indicator pairing.

https://github.com/dlang/phobos/pull/8510
Comment 2 Dlang Bot 2022-07-18 08:06:05 UTC
dlang/phobos pull request #8510 "Fix issue 23250 - corrected reginal indicator pairing." was merged into master:

- 95d19d97acb8ba6e55d5047284e46ffb6f909f36 by Ate Eskola:
  Fix issue 23250 - corrected reginal indicator pairing.

https://github.com/dlang/phobos/pull/8510