Skip to content
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

unicode: U+0000 is not in Cc #10153

Closed
jacobsa opened this issue Mar 13, 2015 · 6 comments
Closed

unicode: U+0000 is not in Cc #10153

jacobsa opened this issue Mar 13, 2015 · 6 comments
Milestone

Comments

@jacobsa
Copy link
Contributor

jacobsa commented Mar 13, 2015

The first line of UnicodeData.txt defines U+0000 as being in category Cc. But package unicode seems to disagree, as confirmed by this program:

package main

import (
        "fmt"
        "unicode"
)

func main() {
        fmt.Println(unicode.In(0, unicode.Cc))
}

Given the provenance of this package and the fact that tables.go is auto-generated, I'm sure I've missed something. What's the reason for rune zero not being in Cc?

@ianlancetaylor
Copy link
Contributor

CC @mpvl@golang.org

@rsc
Copy link
Contributor

rsc commented Apr 10, 2015

@robpike

This is probably due to unicode/maketables.go saying:

if point == 0 {
    return // not interesting and we use 0 as unset
}

Not clear how much we care. That's up to Rob and Marcel, but we should probably close this one way or the other.

@rsc rsc added this to the Go1.5Maybe milestone Apr 10, 2015
@jacobsa
Copy link
Contributor Author

jacobsa commented Apr 26, 2015

Nice find. My opinion is that U+0000 should be in Cc, but it's only a weak and uninformed opinion. Mostly I'm curious about why it's regarded as uninteresting.

@mpvl
Copy link
Contributor

mpvl commented May 5, 2015

Sorry, missed this earlier. I agree that U+0000 should be in Cc. Not doing so will lead to bugs in certain Unicode algorithms. OTOH, fixing it may expose bugs in faulty code quite easily. Unless people object and want it earlier, I can fix this after the 1.5 freeze. Ideally there is a long period before a freeze changing this.

@robpike robpike modified the milestones: Go1.6, Go1.5Maybe May 6, 2015
@robpike
Copy link
Contributor

robpike commented May 6, 2015

Let's do it in 1.6. A freeze is a freeze. Arguably this is a bug but it's also a behavior change.

@mpvl mpvl self-assigned this Aug 17, 2015
@gopherbot
Copy link

CL https://golang.org/cl/13667 mentions this issue.

@mpvl mpvl closed this as completed in c714bbb Aug 24, 2015
jacobsa added a commit to GoogleCloudPlatform/gcsfuse that referenced this issue Feb 18, 2016
This because U+0000 is now part of unicode.C (cf. golang/go#10153), but
is not allowed in path names.
@golang golang locked and limited conversation to collaborators Aug 24, 2016
@rsc rsc unassigned mpvl Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants