D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 23474 - Grapheme should end after carriage return if not followed by line feed.
Summary: Grapheme should end after carriage return if not followed by line feed.
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P3 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2022-11-10 14:38 UTC by Ate Eskola
Modified: 2023-01-20 08:35 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-11-10 14:38:13 UTC
The only time a grapheme can continue after carriage return is when it's followed by a line feed character. Otherwise it must break, even if followed by an extending character: https://www.unicode.org/reports/tr29/tr29-41.html#GB4.

Thus
---
byGrapheme("\r\u0308").walkLength.writeln;
---
...should print 2, but it currently prints 1.
Comment 1 Dlang Bot 2022-12-31 16:13:23 UTC
@dukc created dlang/phobos pull request #8657 "Fixed many issues in grapheme walker" fixing this issue:

- Fix issue 23474 - Fixed many issues in grapheme walker

https://github.com/dlang/phobos/pull/8657
Comment 2 Dlang Bot 2023-01-12 23:09:18 UTC
@rikkimax created dlang/phobos pull request #8665 "[DO NOT MERGE] Grapheme emoji support in std.uni" fixing this issue:

- Fix issue 23474 - Fixed many issues in grapheme walker

https://github.com/dlang/phobos/pull/8665
Comment 3 Dlang Bot 2023-01-20 08:35:49 UTC
dlang/phobos pull request #8657 "Fixed many issues in grapheme walker" was merged into master:

- b334d4ddb2181744e9104249d826b5263762c4b2 by Ate Eskola:
  Fix issue 23474 - Fixed many issues in grapheme walker

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