]> Cypherpunks repositories - gostls13.git/commitdiff
spec: add another sentence about BOMs
authorRob Pike <r@golang.org>
Thu, 11 Apr 2013 18:33:25 +0000 (11:33 -0700)
committerRob Pike <r@golang.org>
Thu, 11 Apr 2013 18:33:25 +0000 (11:33 -0700)
Although one may argue that they should be legal, gc (at least)
disallows byte order marks that are not the first code point
in the file. Added a sentence to the "Implementation restriction"
clause in the "Source code representation" section to document
this better.

Lifting this restriction (again - the rule has changed at least
twice already) would not break any existing programs, should
we later decide yet again to fiddle the rules about these little
fly specks.

R=golang-dev, dsymonds, gri
CC=golang-dev
https://golang.org/cl/8649043

doc/go_spec.html

index 214d1c0acc4e634253b7c1734cf3defc6bef7be1..5cc452d2080fb2fa9874c43b516c2953d708e2cd 100644 (file)
@@ -1,6 +1,6 @@
 <!--{
        "Title": "The Go Programming Language Specification",
-       "Subtitle": "Version of April 3, 2013",
+       "Subtitle": "Version of April 10, 2013",
        "Path": "/ref/spec"
 }-->
 
@@ -103,6 +103,7 @@ compiler may disallow the NUL character (U+0000) in the source text.
 Implementation restriction: For compatibility with other tools, a
 compiler may ignore a UTF-8-encoded byte order mark
 (U+FEFF) if it is the first Unicode code point in the source text.
+A byte order mark may be disallowed anywhere else in the source.
 </p>
 
 <h3 id="Characters">Characters</h3>