Every character. You encode non ascii printable using \DDD. You escape double quotes and back slash. If semicolon or left and right bracket are outside of double quotes and you don’t want them to be treated as specials you escape them. This is all documented in STD13. This is basically the same encoding as for domain names except @ isn’t the origin and periods are not specials.
Remember this is all presentation format. On the wire it is length tagged binary data. If someone is restricting the record size below protocol limits and it is impacting you file a bug report. -- Mark Andrews > El 12 ago 2025, a las 7:09, Vadim Goncharov <[email protected]> > escribió: > > Hello, > > What characters are safe to use in body of TXT records? RFC 1035 is silent on > this, in the sense that <character-string> could be any binary, but this > contradicts with practice where one can see using base64 in TXTs (SPF, DKIM¸ > etc.) > > The context for questions is because I've invented encoding of CBOR (RFC 8949) > using ASCII printable characters 33-126: > https://mailarchive.ietf.org/arch/msg/cbor/LDkcAPM1rf-zKdSxF6zThUceEoQ/ > > which is shorter than equivalent JSON or base64, with own variant of Unicode > typically shorter than UTF-8 in some common cases. So that in principle could > be used in limited TXT records (e.g. AWS rumored to 512 chars max) where > structured data needed but JSON is too long. > > I'm asking to understand if that (alphabet reduction) is really still needed > in > practice or should be issued on 1 April. > > -- > WBR, @nuclight > > _______________________________________________ > DNSOP mailing list -- [email protected] > To unsubscribe send an email to [email protected] _______________________________________________ DNSOP mailing list -- [email protected] To unsubscribe send an email to [email protected]
