From f0a17536074c159aee4b2f378f5918d5d2a2ab73 Mon Sep 17 00:00:00 2001 From: Josh Wolfe Date: Sat, 23 Dec 2017 22:23:06 -0700 Subject: [PATCH] add source encoding rules to the docs. see #663 --- doc/langref.html.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/langref.html.in b/doc/langref.html.in index 162c8b3e0322..09f67a800b35 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -291,6 +291,15 @@ pub fn main() -> %void {
  • Errors
  • Root Source File
  • +

    Source encoding

    +

    Zig source code is encoded in UTF-8. An invalid UTF-8 byte sequence results in a compile error.

    +

    Throughout all zig source code (including in comments), some codepoints are never allowed:

    + +

    The codepoint U+000a (LF) (which is encoded as the single-byte value 0x0a) is the line terminator character. This character always terminates a line of zig source code. A non-empty zig source must end with the line terminator character.

    +

    For some discussion on the rationale behind these designe decisions, see issue #663

    Values

    const warn = @import("std").debug.warn;
     const os = @import("std").os;