unusual characters in zonefile

Hi all.

I have a zone which I would like to spool some nasty "non-standard"
octets into.

Nsd accepts this if I put quotes around it like this:

"gårbåge.t8.dk." TXT "testing"

All is fine. "Unfortunately" my master is BIND and BIND does not like it
when I put quotes around my 8-bit data. Without quotes all is fine
though. That is probably also why even named-xfer writes the zonefile
without quotes. (That I actually transfer my zone with rsync is another
thing.)

My actual problem is that I don't want to have to put a script around
it, to rewrite the zone before I reload it.

I tried to look at zlexer.lex and fix it there, but I must admit, that I
couldn't solve it in the expected 30 minutes, so I thought to learn lex
or to mail this list might be the next step. As I have no real desire to
spend hours learning lex, and I'm not sure the problem is only there, I
was hoping for some advice here as to how to make nsd swallow my input
without the quotes. Ideas?

[On 06 Jan, @ 11:32, Robert wrote in "unusual characters in zonefile ..."]

Hi all.

I have a zone which I would like to spool some nasty "non-standard"
octets into.

Nsd accepts this if I put quotes around it like this:

"gårbåge.t8.dk." TXT "testing"

the most portable way to do this would be:

g\XXXarb\XXXge.t8.dk TXT "testing"

where XXX is the code for that character.

grtz Miek

* Miek Gieben:

the most portable way to do this would be:

g\XXXarb\XXXge.t8.dk TXT "testing"

where XXX is the code for that character.

The *decimal* code, not the *octal* code C programmers would
expect. :sunglasses:

Florian Weimer writes:

The *decimal* code, not the *octal* code C programmers would expect. :sunglasses:

Uh. This is portable? RFCs generally don't cover file formats, so I don't suppose it's in any RFC... may I ask who defined that and which servers support it?

Arnt

Arnt Gulbrandsen <arnt@gulbrandsen.priv.no> writes:

Uh. This is portable? RFCs generally don't cover file formats, so I
don't suppose it's in any RFC... may I ask who defined that and which
servers support it?

From Section 5.1 of RFC 1035:

------------------------ Begin included text ------------------------

Because these files are text files several special encodings are
necessary to allow arbitrary data to be loaded. In particular:

. . .

\DDD where each D is a digit is the octet corresponding to
                the decimal number described by DDD. The resulting
                octet is assumed to be text and is not checked for
                special meaning.

------------------------- End included text -------------------------

[ Credit to Olaf K. for pointing this out when I made the same
assumption. ]

Regards

Geoff