You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current compiler ignores the UTF-8 BOM if it is at the start of the
file, and disallows it anywhere else. Document it in the Source Encoding
section.
Copy file name to clipboardExpand all lines: doc/langref.html.in
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -11480,6 +11480,10 @@ fn readU32Be() u32 {}
11480
11480
but use of hard tabs is discouraged. See {#link|Grammar#}.
11481
11481
</p>
11482
11482
<p>
11483
+
For compatibility with other tools, the compiler ignores a UTF-8-encoded byte order mark (U+FEFF)
11484
+
if it is the first Unicode code point in the source text. A byte order mark is not allowed anywhere else in the source.
11485
+
</p>
11486
+
<p>
11483
11487
Note that running <kbd>zig fmt</kbd> on a source file will implement all recommendations mentioned here.
11484
11488
Note also that the stage1 compiler does <a href="https://github.com/ziglang/zig/wiki/FAQ#why-does-zig-force-me-to-use-spaces-instead-of-tabs">not yet support CR or HT</a> control characters.
0 commit comments