]> Cypherpunks repositories - gostls13.git/commitdiff
spec: an initial BOM can be ignored
authorRob Pike <r@golang.org>
Fri, 7 Sep 2012 17:28:24 +0000 (10:28 -0700)
committerRob Pike <r@golang.org>
Fri, 7 Sep 2012 17:28:24 +0000 (10:28 -0700)
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

doc/go_spec.html

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