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: FoldCategory and FoldScript incorrectly defined #18186

Closed
IsaacDunlap opened this issue Dec 3, 2016 · 8 comments
Closed

unicode: FoldCategory and FoldScript incorrectly defined #18186

IsaacDunlap opened this issue Dec 3, 2016 · 8 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@IsaacDunlap
Copy link

In Go version 1.7.3, the unicode package provides 2 maps: FoldCategory and FoldScript. FoldCategory is only supposed to map category names to tables of code points, but includes script names ("Common", "Greek", "Inherited"). By contrast, although FoldScript is supposed to map script names to tables of code points, the 3 script names ("Common", "Greek", "Inherited") are missing and FoldScript is an empty map.

This bug could be fixed by instead defining Fold Category and FoldScript thus:

var FoldCategory = map[string]*RangeTable{ "L": foldL, "Ll": foldLl, "Lt": foldLt, "Lu": foldLu, "M": foldM, "Mn": foldMn, }

var FoldScript = map[string]*RangeTable{ "Common": foldCommon, "Greek": foldGreek, "Inherited": foldInherited, }

This much better fits what the user of unicode expects when reading the descriptions of FoldCategory and FoldScript (as well as better matching what the names of the variables imply).

@IsaacDunlap IsaacDunlap changed the title unicode: FoldCategory and FoldScript bug. unicode: FoldCategory and FoldScript incorrectly defined Dec 3, 2016
@bradfitz bradfitz added this to the Go1.9 milestone Dec 3, 2016
@bradfitz
Copy link
Contributor

bradfitz commented Dec 3, 2016

/cc @robpike

@robpike
Copy link
Contributor

robpike commented Dec 3, 2016

This is outside my bailiwick. cc @mpvl @rsc

@rsc
Copy link
Contributor

rsc commented Dec 6, 2016

It looks like this is a bug in maketables. I believe @mpvl is away. I'll try to take a look this week.

@rsc rsc self-assigned this Dec 6, 2016
@bradfitz bradfitz added the NeedsFix The path to resolution is known, but the work has not been done. label May 23, 2017
@bradfitz
Copy link
Contributor

@mpvl, could you look at this if you're back?

@bradfitz
Copy link
Contributor

bradfitz commented Jun 7, 2017

Ping @mpvl.

1 similar comment
@bradfitz
Copy link
Contributor

Ping @mpvl.

@gopherbot
Copy link

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

@rsc
Copy link
Contributor

rsc commented Jun 15, 2017

Seems like @mpvl is away (not sure). I'll take care of this. I thought the tables were now generated from something in x/text, but unicode/maketables.go is still in the main distribution and editing and rerunning it has the desired effect, so good enough for me.

@golang golang locked and limited conversation to collaborators Jun 15, 2018
@rsc rsc removed their assignment Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants