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
Assignees
Milestone

Comments

@jacobsa
Copy link
Contributor

@jacobsa 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

@ianlancetaylor ianlancetaylor commented Mar 13, 2015

@rsc
Copy link
Contributor

@rsc 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 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
Member

@mpvl 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 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

@gopherbot gopherbot commented Aug 19, 2015

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

@mpvl mpvl closed this 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.