1
0
mirror of https://github.com/golang/go synced 2024-11-24 05:20:04 -07:00

spec: an initial BOM can be ignored

After further deliberation, let's back down to the Unicode proposal.
Ignoring aBOMinations anywhere means that things like
        grep unsafe *.go
might fail because there's a BOM in the middle: unBOMsafe.

R=golang-dev, rsc, 0xjnml, gri, bradfitz
CC=golang-dev
https://golang.org/cl/6490091
This commit is contained in:
Rob Pike 2012-09-07 10:28:24 -07:00
parent 7e414a5b01
commit 488350ac42

View File

@ -1,6 +1,6 @@
<!--{ <!--{
"Title": "The Go Programming Language Specification", "Title": "The Go Programming Language Specification",
"Subtitle": "Version of September 6, 2012", "Subtitle": "Version of September 7, 2012",
"Path": "/ref/spec" "Path": "/ref/spec"
}--> }-->
@ -101,9 +101,8 @@ compiler may disallow the NUL character (U+0000) in the source text.
</p> </p>
<p> <p>
Implementation restriction: For compatibility with other tools, a Implementation restriction: For compatibility with other tools, a
compiler may ignore any UTF-8-encoded Unicode byte order mark compiler may ignore a UTF-8-encoded byte order mark
(U+FEFF) in the source text outside of <a href="#String_literals">string</a> (U+FEFF) if it is the first Unicode code point in the source text.
and <a href="#Rune_literals">rune</a> literals.
</p> </p>
<h3 id="Characters">Characters</h3> <h3 id="Characters">Characters</h3>