encoding newlines in attribute values

Douglas Otis dotis at mail-abuse.org
Thu Apr 19 06:25:17 UTC 2007


On Apr 18, 2007, at 8:31 PM, Marius Scurtescu wrote:

> Base64 encoding is a pretty good candidate for binary data, but you
> cannot apply the same encoding to text fields.

RFC4648 "URL and Filename safe" Base 64 Alphabet might be a good choice.

> Applying base64, or similar encoding appropriate for binary data, to
> text fields has two drawbacks:
> - renders the field unreadable

Binary data is often unreadable.

> - increases the size of the field

Base 64 increases the size of the encoded element by about 30%.

> URL-encoding has the advantage that probably all web frameworks will
> have functions to encode and decode this format.

URL-encoding increases the size of the encoded element by 300%.

-Doug





More information about the specs mailing list