[Mulgara-dev] why line separator into base64 string?

Roberto Sidoti rsidoti at herzumsoftware.com
Mon Aug 20 14:46:37 UTC 2007


I apologize but I'm not still convinced at all, I try to explain better my
doubts inline:

Andrae wrote>


On 20/08/2007, at 6:51 PM, Roberto Sidoti wrote:
>>
>> Why did you put a "line.separator" every 77 chars?
>http://www.w3.org/TR/xmlschema-2/#base64Binary

>"For compatibility with older mail gateways, [RFC 2045] suggests that 

[RFC 2045] "directly" suggests, this document doesn't. [RFC 2045] is
Multipurpose Internet Mail Extensions (MIME) ...
 
>base64 data should have lines limited to at most 76 characters in  
>length. This line-length limitation is not mandated in the lexical 
>forms of base64Binary data and must not be enforced by XML Schema  
>processors."

It is not mandated 

>The standard goes on to note that the whitespace facet of the  
>datatype is "collapse", which means that any lexical form that 
>validates post-whitespace-stripping is valid, and as mentioned above  
>limiting lines to 76 characters is preferred.

In my opinion It is preferred if you deal with SMTP protocol ... 

>> There is another way to get a valid base64 string from an Answer  
>> object?

>The problem is that it is a valid XSD-base64Binary object - and to

If it doesn't use lines limited to 76 characters in length it is still  a
valid XSD-base64Binary.

>the best of my knowledge we don't currently provide any way to  
>control the formatting of its lexical form.  It is possible to add  
>such a feature, but that would be more likely to be a part of a  
>larger project to enhance our datatype support.

>Andrae

I read into
"RFC 3548 - The Base16, Base32, and Base64 Data Encodings"
. . .
2.1.  Line feeds in encoded data

   MIME [3] 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 [2] 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.
. . .


I want to say that I continue to write on this thread just to have ideas
more clear, I don't want to be offensive with any of you and If I seem
offensive it is due to my bad English :-)
Regards
roby




More information about the Mulgara-dev mailing list