-
Notifications
You must be signed in to change notification settings - Fork 18k
unicode: does not document that ZERO WIDTH NO-BREAK SPACE (\uFEFF) is not considered whitespace #42274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
As documented at https://golang.org/pkg/unicode/#IsSpace, this is determined by the Unicode. Unicode character |
@ianlancetaylor would you be open to a docs update to clarify this? I understand its the spec, but I don't expect most Go developers to have completely read and understand the latest Unicode spec. The character has the name "space" in it and developers would incorrectly assume that
|
CC @mpvl for thoughts. |
For reference, there are 71 unicode characters that have "SPACE" in their name but for which
|
I'm not suggesting we enumerate all of them, but |
I came to the issue tracker as I ran in a similar problem, with |
I hit by this problem, the core lib of golang provided us We should wrapper with a |
I like the idea of
|
Need slightly change in order to work. |
I believe the current enumeration by unicode.IsSpace is sufficient. |
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
)?go env
OutputWhat did you do?
https://play.golang.org/p/V3JHSB7kQX9
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: