Skip to content

Commit

Permalink
all: use https for links to www.unicode.org and unicode.org
Browse files Browse the repository at this point in the history
Those domains are available over HTTPS and we should use them to
ensure privacy and message integrity, particularly in the cases where
we are updating the Unicode table.

Change-Id: I861aa1f581034a762e201ba07faf0e106d231eb3
Reviewed-on: https://go-review.googlesource.com/127918
Run-TryBot: Kevin Burke <kev@inburke.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
kevinburke authored and bradfitz committed Aug 4, 2018
1 parent 96e34ec commit 647d7ef
Show file tree
Hide file tree
Showing 62 changed files with 112 additions and 112 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ To update a Unicode version run

UNICODE_VERSION=x.x.x go generate

where `x.x.x` must correspond to a directory in http://www.unicode.org/Public/.
where `x.x.x` must correspond to a directory in https://www.unicode.org/Public/.
If this version is newer than the version in core it will also update the
relevant packages there. The idna package in x/net will always be updated.

Expand All @@ -75,7 +75,7 @@ To update a CLDR version run
CLDR_VERSION=version go generate

where `version` must correspond to a directory in
http://www.unicode.org/Public/cldr/.
https://www.unicode.org/Public/cldr/.

Note that the code gets adapted over time to changes in the data and that
backwards compatibility is not maintained.
Expand Down
12 changes: 6 additions & 6 deletions cases/cases.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import (

// References:
// - Unicode Reference Manual Chapter 3.13, 4.2, and 5.18.
// - http://www.unicode.org/reports/tr29/
// - http://www.unicode.org/Public/6.3.0/ucd/CaseFolding.txt
// - http://www.unicode.org/Public/6.3.0/ucd/SpecialCasing.txt
// - http://www.unicode.org/Public/6.3.0/ucd/DerivedCoreProperties.txt
// - http://www.unicode.org/Public/6.3.0/ucd/auxiliary/WordBreakProperty.txt
// - http://www.unicode.org/Public/6.3.0/ucd/auxiliary/WordBreakTest.txt
// - https://www.unicode.org/reports/tr29/
// - https://www.unicode.org/Public/6.3.0/ucd/CaseFolding.txt
// - https://www.unicode.org/Public/6.3.0/ucd/SpecialCasing.txt
// - https://www.unicode.org/Public/6.3.0/ucd/DerivedCoreProperties.txt
// - https://www.unicode.org/Public/6.3.0/ucd/auxiliary/WordBreakProperty.txt
// - https://www.unicode.org/Public/6.3.0/ucd/auxiliary/WordBreakTest.txt
// - http://userguide.icu-project.org/transforms/casemappings

// TODO:
Expand Down
2 changes: 1 addition & 1 deletion cases/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func TestCaseProperties(t *testing.T) {
}
// New letters may change case types, but existing case pairings should
// not change. See Case Pair Stability in
// http://unicode.org/policies/stability_policy.html.
// https://unicode.org/policies/stability_policy.html.
if rf := unicode.SimpleFold(r); rf != r && unicode.In(rf, assigned) {
if got, want := c.info.isCased(), propCased(r); got != want {
t.Errorf("cased(%U): got %v; want %v (%x)", r, got, want, c.info)
Expand Down
2 changes: 1 addition & 1 deletion cases/icu_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func exclude(cm, tag, s string) bool {
// implementation (at version 57) and thus are not marked as TODO.

// ICU does not handle leading apostrophe for Dutch and
// Afrikaans correctly. See http://unicode.org/cldr/trac/ticket/7078.
// Afrikaans correctly. See https://unicode.org/cldr/trac/ticket/7078.
{"title", "af nl", "'n"},
{"title", "af nl", "'N"},

Expand Down
2 changes: 1 addition & 1 deletion cases/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (c info) cccType() info {

// For the purpose of title casing we use an approximation of the Unicode Word
// Breaking algorithm defined in Annex #29:
// http://www.unicode.org/reports/tr29/#Default_Grapheme_Cluster_Table.
// https://www.unicode.org/reports/tr29/#Default_Grapheme_Cluster_Table.
//
// For our approximation, we group the Word Break types into the following
// categories, with associated rules:
Expand Down
2 changes: 1 addition & 1 deletion cases/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ func nlTitleSpan(c *context) bool {
return true
}

// Not part of CLDR, but see http://unicode.org/cldr/trac/ticket/7078.
// Not part of CLDR, but see https://unicode.org/cldr/trac/ticket/7078.
func afnlRewrite(c *context) {
if c.hasPrefix("'") || c.hasPrefix("’") {
c.isMidWord = true
Expand Down
2 changes: 1 addition & 1 deletion cases/map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ var testCases = []testCase{

// Note: this specification is not currently part of CLDR. The same holds
// for the leading apostrophe handling for Dutch.
// See http://unicode.org/cldr/trac/ticket/7078.
// See https://unicode.org/cldr/trac/ticket/7078.
10: {
lang: "af",
src: "wag 'n bietjie",
Expand Down
12 changes: 6 additions & 6 deletions collate/build/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ type Builder struct {

// A Tailoring builds a collation table based on another collation table.
// The table is defined by specifying tailorings to the underlying table.
// See http://unicode.org/reports/tr35/ for an overview of tailoring
// See https://unicode.org/reports/tr35/ for an overview of tailoring
// collation tables. The CLDR contains pre-defined tailorings for a variety
// of languages (See http://www.unicode.org/Public/cldr/<version>/core.zip.)
// of languages (See https://www.unicode.org/Public/cldr/<version>/core.zip.)
type Tailoring struct {
id string
builder *Builder
Expand Down Expand Up @@ -93,7 +93,7 @@ func (b *Builder) Tailoring(loc language.Tag) *Tailoring {
// a slice of runes to a sequence of collation elements.
// A collation element is specified as list of weights: []int{primary, secondary, ...}.
// The entries are typically obtained from a collation element table
// as defined in http://www.unicode.org/reports/tr10/#Data_Table_Format.
// as defined in https://www.unicode.org/reports/tr10/#Data_Table_Format.
// Note that the collation elements specified by colelems are only used
// as a guide. The actual weights generated by Builder may differ.
// The argument variables is a list of indices into colelems that should contain
Expand Down Expand Up @@ -219,8 +219,8 @@ func (t *Tailoring) SetAnchorBefore(anchor string) error {
// will cause the collation elements corresponding to extend to be appended
// to the collation elements generated for the entry added by Insert.
// This has the same net effect as sorting str after the string anchor+extend.
// See http://www.unicode.org/reports/tr10/#Tailoring_Example for details
// on parametric tailoring and http://unicode.org/reports/tr35/#Collation_Elements
// See https://www.unicode.org/reports/tr10/#Tailoring_Example for details
// on parametric tailoring and https://unicode.org/reports/tr35/#Collation_Elements
// for full details on LDML.
//
// Examples: create a tailoring for Swedish, where "ä" is ordered after "z"
Expand Down Expand Up @@ -262,7 +262,7 @@ func (t *Tailoring) Insert(level colltab.Level, str, extend string) error {
a := t.anchor
// Find the first element after the anchor which differs at a level smaller or
// equal to the given level. Then insert at this position.
// See http://unicode.org/reports/tr35/#Collation_Elements, Section 5.14.5 for details.
// See https://unicode.org/reports/tr35/#Collation_Elements, Section 5.14.5 for details.
e.before = t.before
if t.before {
t.before = false
Expand Down
8 changes: 4 additions & 4 deletions collate/build/colelem.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func makeExpansionHeader(n int) (uint32, error) {
// - v* is the replacement tertiary weight for the first rune,
// - w* is the replacement tertiary weight for the second rune,
// Tertiary weights of subsequent runes should be replaced with maxTertiary.
// See http://www.unicode.org/reports/tr10/#Compatibility_Decompositions for more details.
// See https://www.unicode.org/reports/tr10/#Compatibility_Decompositions for more details.
const (
decompID = 0xF0000000
)
Expand All @@ -121,7 +121,7 @@ func makeDecompose(t1, t2 int) (uint32, error) {
}

const (
// These constants were taken from http://www.unicode.org/versions/Unicode6.0.0/ch12.pdf.
// These constants were taken from https://www.unicode.org/versions/Unicode6.0.0/ch12.pdf.
minUnified rune = 0x4E00
maxUnified = 0x9FFF
minCompatibility = 0xF900
Expand All @@ -140,7 +140,7 @@ const (
// implicitPrimary returns the primary weight for the a rune
// for which there is no entry for the rune in the collation table.
// We take a different approach from the one specified in
// http://unicode.org/reports/tr10/#Implicit_Weights,
// https://unicode.org/reports/tr10/#Implicit_Weights,
// but preserve the resulting relative ordering of the runes.
func implicitPrimary(r rune) int {
if unicode.Is(unicode.Ideographic, r) {
Expand All @@ -165,7 +165,7 @@ func implicitPrimary(r rune) int {
// [.FBxx.0020.0002.C][.BBBB.0000.0000.C]
// We will rewrite these characters to a single CE.
// We assume the CJK values start at 0x8000.
// See http://unicode.org/reports/tr10/#Implicit_Weights
// See https://unicode.org/reports/tr10/#Implicit_Weights
func convertLargeWeights(elems []rawCE) (res []rawCE, err error) {
const (
cjkPrimaryStart = 0xFB40
Expand Down
2 changes: 1 addition & 1 deletion collate/build/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
// the necessary tables.
// Any Unicode Collation Algorithm (UCA) table entry that has more than
// one rune one the left-hand side is called a contraction.
// See http://www.unicode.org/reports/tr10/#Contractions for more details.
// See https://www.unicode.org/reports/tr10/#Contractions for more details.
//
// We define the following terms:
// initial: a rune that appears as the first rune in a contraction.
Expand Down
2 changes: 1 addition & 1 deletion collate/build/order.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const (
// entry is used to keep track of a single entry in the collation element table
// during building. Examples of entries can be found in the Default Unicode
// Collation Element Table.
// See http://www.unicode.org/Public/UCA/6.0.0/allkeys.txt.
// See https://www.unicode.org/Public/UCA/6.0.0/allkeys.txt.
type entry struct {
str string // same as string(runes)
runes []rune
Expand Down
4 changes: 2 additions & 2 deletions collate/collate.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func (c *Collator) compare() int {
// The returned slice will point to an allocation in Buffer and will remain
// valid until the next call to buf.Reset().
func (c *Collator) Key(buf *Buffer, str []byte) []byte {
// See http://www.unicode.org/reports/tr10/#Main_Algorithm for more details.
// See https://www.unicode.org/reports/tr10/#Main_Algorithm for more details.
buf.init()
return c.key(buf, c.getColElems(str))
}
Expand All @@ -203,7 +203,7 @@ func (c *Collator) Key(buf *Buffer, str []byte) []byte {
// The returned slice will point to an allocation in Buffer and will retain
// valid until the next call to buf.ResetKeys().
func (c *Collator) KeyFromString(buf *Buffer, str string) []byte {
// See http://www.unicode.org/reports/tr10/#Main_Algorithm for more details.
// See https://www.unicode.org/reports/tr10/#Main_Algorithm for more details.
buf.init()
return c.key(buf, c.getColElemsString(str))
}
Expand Down
2 changes: 1 addition & 1 deletion collate/maketables.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func openArchive() *zip.Reader {
}

// parseUCA parses a Default Unicode Collation Element Table of the format
// specified in http://www.unicode.org/reports/tr10/#File_Format.
// specified in https://www.unicode.org/reports/tr10/#File_Format.
// It returns the variable top.
func parseUCA(builder *build.Builder) {
var r io.ReadCloser
Expand Down
2 changes: 1 addition & 1 deletion collate/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func Reorder(s ...string) Option {
// alternateHandling identifies the various ways in which variables are handled.
// A rune with a primary weight lower than the variable top is considered a
// variable.
// See http://www.unicode.org/reports/tr10/#Variable_Weighting for details.
// See https://www.unicode.org/reports/tr10/#Variable_Weighting for details.
type alternateHandling int

const (
Expand Down
4 changes: 2 additions & 2 deletions collate/reg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var long = flag.Bool("long", false,
"run time-consuming tests, such as tests that fetch data online")

// This regression test runs tests for the test files in CollationTest.zip
// (taken from http://www.unicode.org/Public/UCA/<gen.UnicodeVersion()>/).
// (taken from https://www.unicode.org/Public/UCA/<gen.UnicodeVersion()>/).
//
// The test files have the following form:
// # header
Expand Down Expand Up @@ -68,7 +68,7 @@ func Error(e error) {
}

// parseUCA parses a Default Unicode Collation Element Table of the format
// specified in http://www.unicode.org/reports/tr10/#File_Format.
// specified in https://www.unicode.org/reports/tr10/#File_Format.
// It returns the variable top.
func parseUCA(builder *build.Builder) {
r := gen.OpenUnicodeFile("UCA", "", "allkeys.txt")
Expand Down
2 changes: 1 addition & 1 deletion collate/tools/colcmp/chars.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Generated by running
// maketables -root=http://unicode.org/Public/UCA/6.2.0/CollationAuxiliary.zip -cldr=http://www.unicode.org/Public/cldr/23/core.zip
// maketables -root=https://unicode.org/Public/UCA/6.2.0/CollationAuxiliary.zip -cldr=https://www.unicode.org/Public/cldr/23/core.zip
// DO NOT EDIT
// TODO: implement more compact representation for sparse blocks.

Expand Down
2 changes: 1 addition & 1 deletion encoding/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (e *Encoder) Writer(w io.Writer) io.Writer {
}

// ASCIISub is the ASCII substitute character, as recommended by
// http://unicode.org/reports/tr36/#Text_Comparison
// https://unicode.org/reports/tr36/#Text_Comparison
const ASCIISub = '\x1a'

// Nop is the nop encoding. Its transformed bytes are the same as the source
Expand Down
2 changes: 1 addition & 1 deletion encoding/internal/identifier/identifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ package identifier
// - http://www.iana.org/assignments/character-sets/character-sets.xhtml
// - http://www.iana.org/assignments/ianacharset-mib/ianacharset-mib
// - http://www.ietf.org/rfc/rfc2978.txt
// - http://www.unicode.org/reports/tr22/
// - https://www.unicode.org/reports/tr22/
// - http://www.w3.org/TR/encoding/
// - https://encoding.spec.whatwg.org/
// - https://encoding.spec.whatwg.org/encodings.json
Expand Down
10 changes: 5 additions & 5 deletions encoding/internal/identifier/mib.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions encoding/japanese/maketables.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ package main
// go run maketables.go | gofmt > tables.go

// TODO: Emoji extensions?
// http://www.unicode.org/faq/emoji_dingbats.html
// http://www.unicode.org/Public/UNIDATA/EmojiSources.txt
// https://www.unicode.org/faq/emoji_dingbats.html
// https://www.unicode.org/Public/UNIDATA/EmojiSources.txt

import (
"bufio"
Expand Down
2 changes: 1 addition & 1 deletion encoding/unicode/unicode.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (utf8Decoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err e
// and consumed in a greater context that implies a certain endianness, use
// IgnoreBOM. Otherwise, use ExpectBOM and always produce and consume a BOM.
//
// In the language of http://www.unicode.org/faq/utf_bom.html#bom10, IgnoreBOM
// In the language of https://www.unicode.org/faq/utf_bom.html#bom10, IgnoreBOM
// corresponds to "Where the precise type of the data stream is known... the
// BOM should not be used" and ExpectBOM corresponds to "A particular
// protocol... may require use of the BOM".
Expand Down
2 changes: 1 addition & 1 deletion encoding/unicode/utf32/utf32.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var ErrMissingBOM = errors.New("encoding: missing byte order mark")
// endianness, use IgnoreBOM. Otherwise, use ExpectBOM and always produce
// and consume a BOM.
//
// In the language of http://www.unicode.org/faq/utf_bom.html#bom10,
// In the language of https://www.unicode.org/faq/utf_bom.html#bom10,
// IgnoreBOM corresponds to "Where the precise type of the data stream is
// known... the BOM should not be used" and ExpectBOM corresponds to "A
// particular protocol... may require use of the BOM".
Expand Down
2 changes: 1 addition & 1 deletion feature/plural/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
package main

// This file generates data for the CLDR plural rules, as defined in
// http://unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules
// https://unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules
//
// We assume a slightly simplified grammar:
//
Expand Down
4 changes: 2 additions & 2 deletions feature/plural/plural.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
// The definitions in this package are based on the plural rule handling defined
// in CLDR. See
// http://unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules for
// https://unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules for
// details.
package plural

Expand Down Expand Up @@ -151,7 +151,7 @@ func (p *Rules) matchComponents(t language.Tag, n, f, scale int) Form {

// MatchPlural returns the plural form for the given language and plural
// operands (as defined in
// http://unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules):
// https://unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules):
// where
// n absolute value of the source number (integer and decimals)
// input
Expand Down
6 changes: 3 additions & 3 deletions internal/colltab/collelem.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,13 @@ func splitExpandIndex(ce Elem) (index int) {
// - v* is the replacement tertiary weight for the first rune,
// - w* is the replacement tertiary weight for the second rune,
// Tertiary weights of subsequent runes should be replaced with maxTertiary.
// See http://www.unicode.org/reports/tr10/#Compatibility_Decompositions for more details.
// See https://www.unicode.org/reports/tr10/#Compatibility_Decompositions for more details.
func splitDecompose(ce Elem) (t1, t2 uint8) {
return uint8(ce), uint8(ce >> 8)
}

const (
// These constants were taken from http://www.unicode.org/versions/Unicode6.0.0/ch12.pdf.
// These constants were taken from https://www.unicode.org/versions/Unicode6.0.0/ch12.pdf.
minUnified rune = 0x4E00
maxUnified = 0x9FFF
minCompatibility = 0xF900
Expand All @@ -352,7 +352,7 @@ const (
// implicitPrimary returns the primary weight for the a rune
// for which there is no entry for the rune in the collation table.
// We take a different approach from the one specified in
// http://unicode.org/reports/tr10/#Implicit_Weights,
// https://unicode.org/reports/tr10/#Implicit_Weights,
// but preserve the resulting relative ordering of the runes.
func implicitPrimary(r rune) int {
if unicode.Is(unicode.Ideographic, r) {
Expand Down
6 changes: 3 additions & 3 deletions internal/export/idna/idna10.0.0.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
//
// IDNA2008 (Internationalized Domain Names for Applications), is defined in RFC
// 5890, RFC 5891, RFC 5892, RFC 5893 and RFC 5894.
// UTS #46 is defined in http://www.unicode.org/reports/tr46.
// See http://unicode.org/cldr/utility/idna.jsp for a visualization of the
// UTS #46 is defined in https://www.unicode.org/reports/tr46.
// See https://unicode.org/cldr/utility/idna.jsp for a visualization of the
// differences between these two standards.
package idna // import "golang.org/x/text/internal/export/idna"

Expand Down Expand Up @@ -298,7 +298,7 @@ func (e runeError) Error() string {
}

// process implements the algorithm described in section 4 of UTS #46,
// see http://www.unicode.org/reports/tr46.
// see https://www.unicode.org/reports/tr46.
func (p *Profile) process(s string, toASCII bool) (string, error) {
var err error
var isBidi bool
Expand Down
2 changes: 1 addition & 1 deletion internal/export/idna/idna10.0.0_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import "testing"

// TestLabelErrors tests strings returned in case of error. All results should
// be identical to the reference implementation and can be verified at
// http://unicode.org/cldr/utility/idna.jsp. The reference implementation,
// https://unicode.org/cldr/utility/idna.jsp. The reference implementation,
// however, seems to not display Bidi and ContextJ errors.
//
// In some cases the behavior of browsers is added as a comment. In all cases,
Expand Down
Loading

0 comments on commit 647d7ef

Please sign in to comment.