Re: base64Binary lexical/octet length

Mike,

I agree. It is evident that only 1 or 2 trailing "=" chars should be
allowed.
I am assuming that, this fact can be deduced too, for those who prefer
intuitive ideas. In case we end up with fewer than 24 bits (of octets) in
the last group, ie. either 8 bits or 16 bits, then they would encode to 2
and 3 base64 chars respectively. Thus the need of exactly 2 and 1 padding(=)
chars in those cases to make up for the 4-char base64 groups.

-- 
Best Regards,
Satya Prakash Tripathi

On Mon, Apr 11, 2011 at 11:03 PM, Michael Kay <mike@saxonica.com> wrote:

>
>  You may find it helpful to read RFC 3548, which is normatively referred
>> to from the XSD spec.
>>
>> http://www.ietf.org/rfc/rfc3548.txt
>>
>>
> It may also be worth noting that XSD requires strict conformance to the
> RFC, whereas most base64 implementations available "in the wild" are liberal
> in what they accept, for example in areas such as the exact number of
> trailing "=" signs.
>
> Michael Kay
> Saxonica
>

Received on Monday, 11 April 2011 19:04:15 UTC