Subject: [netmod] issue Y56 UTF8 non-characters

From: Martin Bjorklund <[email-masked]>
Date: Fri, 24 Oct 2014 22:22:43 +0200 (CEST)

Hi,

When I was looking at issue Y56, I realized that 6020 doesn't define
any rules for characters in YANG modules.  This impacts even things
like enum names - there are no rules for them at all.

I think we should have the same rules for the YANG module as for the
"string" built-in type.

So I propose the following changes:

------------------------------------------------
In section 6:

OLD:

   YANG modules use the UTF-8 [RFC3629] character encoding.

NEW:

   YANG modules use the UTF-8 [RFC3629] character encoding.

   Legal characters in YANG modules are the Unicode and ISO/IEC 10646
   [ISO.10646] characters, excluding the surrogate blocks, the
   noncharacters, and the C0 control characters except tab, carriage
   return, and line feed.  The character syntax is formally defined by
   the rule "yang-char" in Section 13.

(yes I know, double negation in there...  any suggestions?
s/except/but including/ ?)

------------------------------------------------
In 9.4.  The string Built-In Type

OLD:

   The string built-in type represents human-readable strings in YANG.
   Legal characters are tab, carriage return, line feed, and the legal
   characters of Unicode and ISO/IEC 10646 [ISO.10646]:

     ;; any Unicode character, excluding the surrogate blocks,
     ;; FFFE, and FFFF.
     string = *char
     char = %x9 / %xA / %xD / %x20-D7FF / %xE000-FFFD /
            %x10000-10FFFF

NEW:

   The string built-in type represents human-readable strings in YANG.
   Legal characters are the Unicode and ISO/IEC 10646 [ISO.10646]
   characters, excluding the surrogate blocks, the noncharacters, and
   the C0 control characters except tab, carriage return, and line feed.
   The string syntax is formally defined by the rule "yang-string" in
   Section 13.

------------------------------------------------
In the grammar:

OLD:

   string              = < an unquoted string as returned by
                           the scanner >

NEW:

   string              = < an unquoted string as returned by
                           the scanner, that matches the rule
                           yang-string >

   yang-string        = *yang-char

   ;; any Unicode character, excluding the surrogate blocks, the
   ;; noncharacters, and the C0 control characters except
   ;; tab, carriage return, and line feed.
   yang-char = %x9 / %xA / %xD / %x20-D7FF /
                               ; exclude surrogate blocks %xD800-DFFF
              %xE000-FDCF /    ; exclude noncharacters %xFDD0-FDEF
              %xFDF0-FFFD /    ; exclude noncharacters %xFFFE-FFFF
              %x10000-1FFFD /  ; exclude noncharacters %x1FFFE-1FFFF
              %x20000-2FFFD /  ; exclude noncharacters %x2FFFE-2FFFF
              %x30000-3FFFD /  ; exclude noncharacters %x3FFFE-3FFFF
              %x40000-4FFFD /  ; exclude noncharacters %x4FFFE-4FFFF
              %x50000-5FFFD /  ; exclude noncharacters %x5FFFE-5FFFF
              %x60000-6FFFD /  ; exclude noncharacters %x6FFFE-6FFFF
              %x70000-7FFFD /  ; exclude noncharacters %x7FFFE-7FFFF
              %x80000-8FFFD /  ; exclude noncharacters %x8FFFE-8FFFF
              %x90000-9FFFD /  ; exclude noncharacters %x9FFFE-9FFFF
              %xA0000-AFFFD /  ; exclude noncharacters %xAFFFE-AFFFF
              %xB0000-BFFFD /  ; exclude noncharacters %xBFFFE-BFFFF
              %xC0000-CFFFD /  ; exclude noncharacters %xCFFFE-CFFFF
              %xD0000-DFFFD /  ; exclude noncharacters %xDFFFE-DFFFF
              %xE0000-EFFFD /  ; exclude noncharacters %xEFFFE-EFFFF
              %xF0000-FFFFD /  ; exclude noncharacters %xFFFFE-FFFFF
              %x100000-10FFFD  ; exclude noncharacters %x10FFFE-10FFFF

/martin

---

From: Chris Elliott <[email-masked]>
Date: Fri, 24 Oct 2014 16:41:19 -0400

> So I propose the following changes:

...[ISO.10646] characters, including tab, carriage return, and line feed,
but excluding the other C0 control characters, surrogate blocks and
non-characters.

> s/except/but including/ ?)

Hope this helps.
Chris.

> _______________________________________________
> netmod mailing list
> [email-masked] <javascript:;>
> https://www.ietf.org/mailman/listinfo/netmod
>

-- 
Chris Elliott
CCIE # 2013

“You and I are mirages that perceive themselves”
--Douglas Hofstadter