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

x/text/internal/language: Script overflows during generation #45093

Closed
rolandshoemaker opened this issue Mar 17, 2021 · 2 comments
Closed

x/text/internal/language: Script overflows during generation #45093

rolandshoemaker opened this issue Mar 17, 2021 · 2 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@rolandshoemaker
Copy link
Member

The IANA Language Subtag Registry contains more than 256 scripts, causing the generated script indices to overflow the Script type. Bumping it to uint16 seems reasonable.

cc @mpvl

@gopherbot gopherbot added this to the Unreleased milestone Mar 17, 2021
@cherrymui cherrymui added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 18, 2021
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/304029 mentions this issue: internal/language: bump script types to uint16 and update registry

@esote
Copy link

esote commented Jul 26, 2022

@rolandshoemaker @neild @josharian @mpvl Any update on the open CL? This issue is blocking #51822 for tagging a new x/text release, which is blocking x/text support for generics #52553. Seems like the size increase discussion was resolved?

xhit pushed a commit to xhit/text that referenced this issue Oct 10, 2022
The IANA language-subtag-registry now contains more than 256 scripts,
causing the uint8 types to overflow during table generation. The
internal script types are bumped to uint16 which should be more than
enough.

Fixes golang/go#45093

Change-Id: I58184902e6652f488521d084fce6e0b424121825
Reviewed-on: https://go-review.googlesource.com/c/text/+/304029
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Roland Shoemaker <roland@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
@golang golang locked and limited conversation to collaborators Aug 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants