Descriptiongc, go/parser: accept .go files with UTF-8 BOM, ignore that bytes before compile and parse.
Some text editors, especially in Windows, get used to add UTF-8 BOM to file header.
Currently, the BOM are "invalid characters" for gc and go/parser, which should be
ignored to make sure that the files are compiled and parsed properly.
After this CL, cmd/go godoc gofmt and other go tools works well with UTF-8 BOM, too.
Patch Set 1 #Patch Set 2 : diff -r 6c1797405851 https://code.google.com/p/go #
MessagesTotal messages: 5
|