base64 and linefeeds

RFC 3548 [1] is better reference than RFC 2045 (MIME) for defining
Base64 in XML Schema Part 2.  Future versions, at
least, should use the newer document as a reference.  The good
news is that XML Schema's departure from RFC 2045 regarding
linefeeds and whitespace (disallowing them in the canonical
representation) is in agreement with RFC 3548:

2.1. Line feeds in encoded data

   MIME is often used as a reference for base 64 encoding.  However,
   MIME does not define "base 64" per se, but rather a "base 64
   Content-Transfer-Encoding" for use within MIME.  As such, MIME
   enforces a limit on line length of base 64 encoded data to 76
   characters.  MIME inherits the encoding from PEM stating it is
   "virtually identical", however PEM uses a line length of 64
   characters.  The MIME and PEM limits are both due to limits within
   SMTP.

   Implementations MUST NOT not add line feeds to base encoded data
   unless the specification referring to this document explicitly
   directs base encoders to add line feeds after a specific number of
   characters.

xan

[1] http://zvon.org/tmRFC/RFC3548/Output/index.html

Received on Wednesday, 24 November 2004 19:14:01 UTC