Open l0n3star opened 1 year ago
CC @mpvl via https://dev.golang.org/owners
The underlying issue is that x/text doesn't handle multi-rune unicode grapheme clusters.
In the meantime, you could use this third-party module uniseg to iterate through grapheme clusters.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?I'm using the go playground
What did you do?
Playground: https://go.dev/play/p/Jq9CnUd2zA8
What did you expect to see?
It should print π§πΎββοΈπ±πΎπ©πΎβπ¦°
I think it has to do with the library not handling zero width joiners. If I use this string: "ππ" it works as expected.
What did you see instead?
οΈββπΎπ§πΎπ±π¦°βπΎπ©