- From: Pete Cordell <pete++xmldev@codalogic.com>
- Date: Fri, 30 Jun 2023 19:20:37 +0100
- To: Ignacio Losiggio <ilosiggio@salesforce.com>, xmlschema-dev@w3.org, APIKit Team <apikit@mulesoft.com>
RFC 4648 says: Implementations MUST reject the encoded data if it contains characters outside the base alphabet when interpreting base-encoded data, unless the specification referring to this document explicitly states otherwise. I'd go with that definition. HTH, Pete. -- --------------------------------------------------------------------- Pete Cordell Codalogic Ltd C++ tools for C++ programmers, http://codalogic.com Read & write XML in C++, http://www.xml2cpp.com --------------------------------------------------------------------- On 29/06/2023 20:45, Ignacio Losiggio wrote: > Hi! I'm trying to understand if a given behaviour is spec compliant or not. > > XML Schema Part 2 says: >> The lexical forms of base64Binary values are limited to the 65 characters of the Base64 Alphabet defined in [RFC 2045], i.e., a-z, A-Z, 0-9, the plus sign (+), the forward slash (/) and the equal sign (=), together with the characters defined in [XML 1.0 (Second Edition)] as white space. **No other characters are allowed**. > > But the corresponding RFC allows decoders to ignore any non-decodable > character. Should the XML Schema have a bigger priority at the expense > of compatibility with off-the-shelf base64 utilities? > > I've found an XML library that shows the MIME-mandated behaviour > instead of the XML Schema one [1]. It's probably not the only one. > > [1] https://github.com/xmlark/msv/issues/4 > >
Received on Friday, 30 June 2023 18:27:48 UTC