W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2011

[whatwg] Specs for window.atob() and window.btoa()

From: Joshua Bell <josh@lindenlab.com>
Date: Sat, 5 Feb 2011 22:56:27 -0800
Message-ID: <AANLkTinSgFJO4A-PB1GU2GPmR28=+F-76rL7T9FkXmY-@mail.gmail.com>
On Sat, Feb 5, 2011 at 6:37 PM, Joshua Cranmer <Pidgeot18 at verizon.net>wrote:

> On 02/05/2011 08:29 PM, Jonas Sicking wrote:
>
>> So my first question is, can someone give examples of sources of
>> base64 data which contains whitespace?
>>
> The best guess I have is base64-encoding MIME parts, which would be
> hardwrapped every 70-80 characters or so.


RFC 3548 "The Base16, Base32, and Base64 Data Encodings" Section 2.1
discusses line feeds in encoded data, calling out the MIME line length
limit. For example, Perl's MIME::Base64 has an encode_base64() API that by
default inserts newlines after 76 characters. (An optional argument allows
this behavior to be overridden.)

Section 2.3 discusses "Interpretation of non-alphabet characters in encoded
data" specifically in base64 (etc) encoded data.

-- Josh
Received on Saturday, 5 February 2011 22:56:27 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:30 UTC