Re: Last Call: 'Domain Name System (DNS) Case Insensitivity Clarification' to Proposed Standard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeffrey Hutzelman <jhutz@xxxxxxx> writes:

> [..T]he _common_ convention is to use a backslash followed by the
> value of the octet as an unsigned integer represented by exactly
> three _octal_ digits.  This is the syntax used by programming
> languages like C and perl.  For example, ASCII ESC (0x1b) is
> represented as \033, not \027.

Actually, the convention used in C and Perl is to use \0, followed by
zero, one, or two octal digits (leaving some values of octets without
representation).

I personally think it's a poor convention as it uses varying number of
digits, so it becomes difficult to represent, say, the NUL character
followed by the digit "1".  (I still use the convention in cases when
it is familiar to most from documentation, e.g., "\015\012" in Perl.)

A reasonable convention is hexadecimal: backslash, followed by the
letter x, followed by exactly two hexadecimal digits; e.g., "\x1b" for
ESC.  This notation, while looking familiar, has differences from both
Perl and C hex notations: in Perl, you can have just a single hex
digit following ``backslash x'', while in C you can have arbitrarily
many.

With the common conventions so unnecessarily complex and difficult to
use, it doesn't surprise me that the document authors chose to use a
nonstandard one.  I'd have chosen a different one (hex with exactly
two digits, which won't deceive C and Perl programmers in the same way
"\027" meant for ESC would), but that's just a minor typographic
convention.

-- 
Stanislav Shalunov		http://www.internet2.edu/~shalunov/

This message is designed to be viewed with 0.06479891g of NaCl.

_______________________________________________

Ietf@xxxxxxxx
https://www1.ietf.org/mailman/listinfo/ietf

[Index of Archives]     [IETF Annoucements]     [IETF]     [IP Storage]     [Yosemite News]     [Linux SCTP]     [Linux Newbies]     [Fedora Users]