Closed jpstotz closed 2 years ago
An ASCII property list may actually only contain ASCII characters, all other characters are supposed to be encoded using escape sequences.
But this is a bug that would affect the XML property list format, so it needs to be addressed.
<!ENTITY % plistObject "(array | data | date | dict | real | integer | string | true | false )" > <!ELEMENT plist %plistObject;> <!ATTLIST plist version CDATA "1.0" >
<!ELEMENT array (%plistObject;)> <!ELEMENT dict (key, %plistObject;)> <!ELEMENT key (#PCDATA)>
<!ELEMENT string (#PCDATA)> <!ELEMENT data (#PCDATA)> <!ELEMENT date (#PCDATA)>
<!ELEMENT true EMPTY> <!ELEMENT false EMPTY> <!ELEMENT real (#PCDATA)> <!ELEMENT integer (#PCDATA)>
Finally got around to work on this issue and fix it. A bugfix release is coming up.
The two methods
com.dd.plist.PropertyListParser.determineType(InputStream, int)
andcom.dd.plist.PropertyListParser.determineType(byte[])
seem to be hard-coded to the UTF-8 BOMEF BB BF
.However the parser implementation of
ASCIIPropertyListParser
is for example also able to handle UTF-16 and UTF-32 files, but you will never get to that point if you try to read an UTF-16 ASCII file using one of thecom.dd.plist.PropertyListParser.parse(..)
method as because of the BOM thedetermineType(String)
will not work correctly so that you end up with aPropertyListFormatException
.