-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
This must be the weirdest issue name I've ever submitted! π
Here's a little program to reproduce the issue:
app [main] {
pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.15.0/SlwdbJ-3GR7uBWQo6zlmYWNYOxnvo8r6YABXD-45UOw.tar.br",
unicode: "https://github.com/roc-lang/unicode/releases/download/0.1.2/vH5iqn04ShmqP-pNemgF773f86COePSqMWHzVGrAKNo.tar.br",
}
import unicode.Grapheme
import pf.StdOut
main =
result = Grapheme.split "π΄ββ οΈπππ©π³οΈβπ"
StdOut.line! (result |> Inspect.toStr)The output is:
(Ok ["π΄βοΈ", "π", "π", "π©", "π³οΈβπ"])
But it should be:
(Ok ["π΄ββ οΈ", "π", "π", "π©", "π³οΈβπ"])
The pirate flag is composed of three code-points: π΄ (black flag), \u200d (zero width joiner), and β οΈ (skull), but Grapheme.split drops the β οΈ codepoint, preserving only the first two (the second is invisible, but it's there, I checked).
Anton-4
Metadata
Metadata
Assignees
Labels
No labels