Closed silverwind closed 6 years ago
@mafintosh any opinion?
@silverwind we should keep them as buffers. We used to have them as strings but I remember @watson found it there is some case where they can contain binary data in the spec
You're right. While the original RFC that specs TXT limits it to ASCII, rfc6763 introduces possibly binary data.
The value is opaque binary data. Often the value for a particular attribute will be US-ASCII [RFC20] or UTF-8 [RFC3629] text, but it is legal for a value to be any binary data.
These are currently encoded as a Buffer, but I think it would be more useful to have them as a text string. If we decode them as text, should ASCII or UTF8 be used? I'd wager the spec only supports ASCII but I see no harm if we do UTF8 as it is a superset of ASCII.