aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/net/idna/trieval.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/net/idna/trieval.go')
-rw-r--r--vendor/golang.org/x/net/idna/trieval.go17
1 files changed, 11 insertions, 6 deletions
diff --git a/vendor/golang.org/x/net/idna/trieval.go b/vendor/golang.org/x/net/idna/trieval.go
index 63cb03b..7a8cf88 100644
--- a/vendor/golang.org/x/net/idna/trieval.go
+++ b/vendor/golang.org/x/net/idna/trieval.go
@@ -26,9 +26,9 @@ package idna
// 15..3 index into xor or mapping table
// }
// } else {
-// 15..13 unused
-// 12 modifier (including virama)
-// 11 virama modifier
+// 15..14 unused
+// 13 mayNeedNorm
+// 12..11 attributes
// 10..8 joining type
// 7..3 category type
// }
@@ -49,15 +49,20 @@ const (
joinShift = 8
joinMask = 0x07
- viramaModifier = 0x0800
+ // Attributes
+ attributesMask = 0x1800
+ viramaModifier = 0x1800
modifier = 0x1000
+ rtl = 0x0800
+
+ mayNeedNorm = 0x2000
)
// A category corresponds to a category defined in the IDNA mapping table.
type category uint16
const (
- unknown category = 0 // not defined currently in unicode.
+ unknown category = 0 // not currently defined in unicode.
mapped category = 1
disallowedSTD3Mapped category = 2
deviation category = 3
@@ -110,5 +115,5 @@ func (c info) isModifier() bool {
}
func (c info) isViramaModifier() bool {
- return c&(viramaModifier|catSmallMask) == viramaModifier
+ return c&(attributesMask|catSmallMask) == viramaModifier
}