[bind10-dev] arbitrary character and plain char
JINMEI Tatuya / 神明達哉
jinmei at isc.org
Wed Apr 25 18:56:57 UTC 2012
The following are what I tried to explain in the today's loader
discussion:
RFC1035 states: "The labels in the domain name are expressed as
character strings and separated by dots. Quoting conventions allow
arbitrary characters to be stored in domain names."
It's not clear to me whether it allows a domain name in a master files
contain a 8-bit character value of , e.g. 255, not using the special
encoding of \255.
If it allows that, and if we store it in a plain char, it may or may
not work correctly for systems where plain chars are signed. "The C++
Programming Language" (ISBN 978-0201700732) shows an example of
assigning 1023 to a signed char, and states "Plausible results are 127
and -1". In the former case, we'll lose highest 1 bit at the point of
assignment.
But as (in my understanding) we agreed, if we consider non-encoded
values larger than 127 non supported (maybe with a warning), this
won't be an issue anyway.
---
JINMEI, Tatuya
More information about the bind10-dev
mailing list