Giter Site home page Giter Site logo

plist's Introduction

  • 👋 Hi, I’m @SuperHich
  • 👀 I’m interested in Mobile developpments specially native Android
  • 🌱 I’m currently learning Dart/Flutter
  • 💞️ I’m looking to collaborate on every interesting project
  • 📫 How to reach me : simply from my github account :-)

plist's People

Watchers

 avatar

plist's Issues

Incorrecting parsing of InputStream data

What steps will reproduce the problem?

Use any InputStream whose available() method does not return the total number 
of bytes in the stream. Then the stream will not be read fully.

Original issue reported on code.google.com by daniel.dreibrodt on 4 Aug 2011 at 12:49

OSGi support

Hi there,

I would like to use the library in Eclipse project (OSGi), which use Tycho 
plugin for Maven to resolve dependencies. This plugin can resolve only OSGi 
dependencies. com.dd.plist is not an OSGi bundle at the moment. To make it OSGi 
bundle is it enough to add a MANIFEST.MF file to the META-INF directory before 
packaging its source code into .jar. So please apply my attached patch to 
pom.xml, which adds two plugins: maven-bundle-plugin - creates a proper 
MANIFEST.MF file and maven-jar-plugin - deploys MANIFEST.MF to the right place. 
Of course that breaks no existing functionality.

Regards, Artem.

Original issue reported on code.google.com by [email protected] on 15 May 2013 at 6:00

Attachments:

binary parsing: NSReal

NSReal objects are not yet supported when parsing binary property lists.

Original issue reported on code.google.com by daniel.dreibrodt on 8 Oct 2010 at 4:01

.pbxproj hash identified converted to boolean

What steps will reproduce the problem?
1. Parse test-files/issue33.pbxproj file from test files
2. Access following path "objects -> 65541A9C16D13B8C00A968D5 -> fileRef"

What is the expected output? What do you see instead?

Got "false" by real value "65541A9B16D13B8C00A968D5"

For more information checkout testIssue38() in IssueTest.java

Original issue reported on code.google.com by [email protected] on 9 May 2013 at 11:52

Attachments:

Generating binary property lists

The library is currently unable to generate binary property list. A goal for 
the future would be to support that.

Original issue reported on code.google.com by daniel.dreibrodt on 8 Oct 2010 at 4:02

GPL

Nice project - except that is GPL licensed and for most other projects cannot 
be used because of that.

Original issue reported on code.google.com by tcurdt on 27 Jul 2011 at 11:24

Cannot save plists in Binary format with current release (r59)

What steps will reproduce the problem?
1. PropertyListParser.convertToBinary(new File(__INPUTFILE__), new 
File(__OUPUTFILE__))

What is the expected output? What do you see instead?

EXPECTED: output plist file saved as a binary plist

GIVEN:
java.lang.IllegalStateException: Current state = CODING_END, new state = CODING
    at java.nio.charset.CharsetEncoder.throwIllegalStateException(CharsetEncoder.java:941)
    at java.nio.charset.CharsetEncoder.canEncode(CharsetEncoder.java:859)
    at java.nio.charset.CharsetEncoder.canEncode(CharsetEncoder.java:934)
    at com.dd.plist.NSString.toBinary(NSString.java:108)
    at com.dd.plist.BinaryPropertyListWriter.write(BinaryPropertyListWriter.java:112)
    at com.dd.plist.BinaryPropertyListWriter.write(BinaryPropertyListWriter.java:63)
    at com.dd.plist.BinaryPropertyListWriter.write(BinaryPropertyListWriter.java:52)
    at com.dd.plist.PropertyListParser.saveAsBinary(PropertyListParser.java:154)
    at PlistParser.main(PlistParser.java:75)



What version of the product are you using? On what operating system?
r59 / Java 7

Please provide any additional information below.

Correction: 

NSString:107
--------------------
REPLACE: 

if(asciiEncoder==null)
asciiEncoder = Charset.forName("ASCII").newEncoder();


WITH:
if(asciiEncoder==null)
{
   asciiEncoder = Charset.forName("ASCII").newEncoder();
}
else
{
   asciiEncoder.reset();
}


Original issue reported on code.google.com by [email protected] on 21 Mar 2012 at 1:34

Use of a shared DocumentBuilder causes SAXException during parallel resolutions

This problem is the same of: ttps://issues.apache.org/jira/browse/IVY-1147

This happen when calling: (NSDictionary)PropertyListParser.parse(s.bytes);
On multiples threads at the same time.

The exception is thrown:
org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:263)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
    at com.dd.plist.XMLPropertyListParser.parse(XMLPropertyListParser.java:128)
    at com.dd.plist.XMLPropertyListParser.parse(XMLPropertyListParser.java:114)
    at com.dd.plist.PropertyListParser.parse(PropertyListParser.java:86)
    at com.dd.plist.PropertyListParser$parse.call(Unknown Source)


Original issue reported on code.google.com by [email protected] on 28 Sep 2011 at 7:40

Have NSNumber keep a copy of its source String

I have used ddplist to parse NextStep plists with very long strings that look 
like numbers, e.g. 100000000000002900000044. ddplist tries to convert them to 
NSNumbers which are backed by doubles. toString on such NSNumbers fails to give 
the original String. So this patch causes NSNumber to automatically store the 
original String, so in this scenario, we have some way to get the String back 
out.

Original issue reported on code.google.com by [email protected] on 9 Sep 2014 at 8:33

Attachments:

binary parsing: NSDate

NSDate objects are not yet supported when parsing binary property lists.

Original issue reported on code.google.com by daniel.dreibrodt on 8 Oct 2010 at 4:01

Enhancement : Add functions to get Java types from NSObjects

What steps will reproduce the problem?
1. Example : Get an Int from NSDictionary 

What is the expected output? What do you see instead?
- expected : An int returned
- instead : A NSObject

What version of the product are you using? On what operating system?
r100 on MacOSX

Please provide any additional information below.

To explain the enhancement, here is a static function I wrote to help myself :

public static <T> T typeFromNSObject(NSObject object, Class<T> expectedType){
    return (expectedType.isInstance(object)) ? expectedType.cast(object) : null;
}

Then, some functions of NSObject could be :
public int toInt(){
    return typeFromNSObject(this,Integer.class).intValue();
}

Original issue reported on code.google.com by [email protected] on 11 Apr 2013 at 12:26

string which contains an ampersand is not shown correctly

if a string object contains an ampersand the text after the ampersand
is missing.

for example:

the plist contains the url http://www.example.com?param1=1234&param2=abcd

after retrieving the string

String url = ((NSDictionary)content).objectForKey("url").toString();

the url is cropped

http://www.example.com?param1=1234


I am using revison 46.


Original issue reported on code.google.com by [email protected] on 31 Oct 2011 at 2:34

OutOfMemoryError when parsing a binary plist file on Android

What steps will reproduce the problem?
1. Open binary file home-buttons.plist
2. Application crashes

What is the expected output? What do you see instead?
Expected : NSDictionary object
Instead : 
03-27 09:57:36.081: E/AndroidRuntime(8726): FATAL EXCEPTION: main
03-27 09:57:36.081: E/AndroidRuntime(8726): java.lang.OutOfMemoryError: int[] 
of length 1795162112 exceeds the VM limit
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
com.dd.plist.BinaryPropertyListParser.doParse(BinaryPropertyListParser.java:95)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
com.dd.plist.BinaryPropertyListParser.parse(BinaryPropertyListParser.java:60)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
com.dd.plist.BinaryPropertyListParser.parse(BinaryPropertyListParser.java:118)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
com.dd.plist.BinaryPropertyListParser.parse(BinaryPropertyListParser.java:131)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
com.dd.plist.PropertyListParser.parse(PropertyListParser.java:67)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
------------------------------------
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
------------------------------------
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
android.app.Activity.performCreate(Activity.java:5104)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
android.app.ActivityThread.access$600(ActivityThread.java:141)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
android.os.Handler.dispatchMessage(Handler.java:99)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
android.os.Looper.loop(Looper.java:137)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
android.app.ActivityThread.main(ActivityThread.java:5039)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
java.lang.reflect.Method.invokeNative(Native Method)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
java.lang.reflect.Method.invoke(Method.java:511)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
03-27 09:57:36.081: E/AndroidRuntime(8726):     at 
dalvik.system.NativeStart.main(Native Method)



What version of the product are you using? On what operating system?

r108 on Galaxy Nexus Android 4.2.1

Please provide any additional information below.

See attached file to reproduce problem.


Original issue reported on code.google.com by [email protected] on 27 Mar 2014 at 9:23

Attachments:

Problems with XML parsing when offline and or on Android devices

What steps will reproduce the problem?
1. Run:
NSDictionary testDict = (NSDictionary)PropertyListParser.parse(file);

where file is the attached temp.pst and contains: 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>id</key>
        <string>foo</string>
        <key>description</key>
        <string>bar</string>
</dict>
</plist>


What is the expected output? What do you see instead?

Exepected is a dictionary object with two key value pairs.

Instead, XMLPropertyListParser parseObject (line 86) interprets the first child 
node type as '#text' and as a result returns a null object.  


What version of the product are you using? On what operating system?
The latest source as of 8/3/12

Original issue reported on code.google.com by [email protected] on 3 Aug 2011 at 11:12

Attachments:

Use StringBuffer or StringBuilder instead ""+

I use the library for generating XML. The addition of strings makes XML 
generation is very slow. Why not use StringBuffer or StringBuilder instead of 
adding Strings?

For example:

    public void toXML(StringBuffer xml) {
        xml.append("<array>");
        for (NSObject o : array) {
            o.toXML(xml);
        }
        xml.append("</array>");
    }

    public String toXMLPropertyList() {
        StringBuffer xml = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
        xml.append(System.getProperty("line.separator"));
        xml.append("<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">");
        xml.append(System.getProperty("line.separator"));
        xml.append("<plist version=\"1.0\">").append(System.getProperty("line.separator"));
        toXML(xml);
        xml.append("</plist>");
        return xml.toString();
    }


Original issue reported on code.google.com by [email protected] on 27 May 2011 at 1:30

Add capability to parse keyed archives

Property lists created by NSKeyedArchiver cannot be parsed.

Information on this format can be found here:
http://www.opensource.apple.com/source/CF/CF-476.18/CFBinaryPList.c
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Archivin
g/Archiving.html#//apple_ref/doc/uid/10000047i
http://search.cpan.org/~kyoki/Data-Plist-0.1/lib/Data/Plist.pm#KEYED_ARCHIVES

Original issue reported on code.google.com by daniel.dreibrodt on 6 Aug 2011 at 10:15

java.lang.UnsupportedOperationException: The given data is neither a binary nor a XML property list.

I'm using the library on Android using this code:

InputStream ins = getResources().openRawResource(R.xml.skillsanddrills);

NSDictionary rootDict;
try {
rootDict = (NSDictionary)PropertyListParser.parse(ins);
....

However I'm getting this error:
java.lang.UnsupportedOperationException: The given data is neither a binary nor 
a XML property list. ASCII property lists are not supported.

The file is a XML property list so I don't know why it's poping up with this 
error. Is it a bug or is there some other way I need to load my files?


Original issue reported on code.google.com by [email protected] on 21 Sep 2011 at 10:05

non-ascii UTF-8 not parsed correctly

What steps will reproduce the problem?
1. Compile TestPList.java
2. Run it in a directory with Info.plist

What is the expected output? What do you see instead?

correct output:
75 105 100 8217 115 32 105 80 104 111 110 101

current library output:
75 105 100 8218 196 244 115 32 105 80 104 111 110 101 

the 8218 196 244 part is wrong.  That should be just 8217.

What version of the product are you using? On what operating system?

svn head, OSX 10.6.5, JRE build 1.6.0_22-b04-307-10M3261

Please provide any additional information below.

Patch: just replace the body of NSString(NSString) with "content = string".  
I'm not sure what the code you have there is intended to do, but it breaks 
straightforward UTF-8 reading.

Original issue reported on code.google.com by [email protected] on 20 Mar 2011 at 3:49

Attachments:

Please support NSKeyedArchiver

What steps will reproduce the problem?
1. NSKeyedArchiver not supported

What is the expected output? What do you see instead?
NSKeyedArchiver should be supported


What version of the product are you using? On what operating system?
Latest


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 26 Nov 2012 at 7:16

  • Merged into: #17

Support 4-byte Real NSNumbers (NSNumber float)

When attempting to parse NSNumbers created from floats ([NSNumber 
numberWithFloat:2.0]), reports "bad byte array length 4".  


08-05 10:04:19.990: WARN/System.err(21868): java.lang.IllegalArgumentException: 
bad byte array length 4
08-05 10:04:20.000: WARN/System.err(21868):     at 
com.dd.plist.BinaryPropertyListParser.parseDouble(BinaryPropertyListParser.java:
385)
08-05 10:04:20.000: WARN/System.err(21868):     at 
com.dd.plist.NSNumber.<init>(NSNumber.java:71)
08-05 10:04:20.000: WARN/System.err(21868):     at 
com.dd.plist.BinaryPropertyListParser.parseObject(BinaryPropertyListParser.java:
173)
08-05 10:04:20.000: WARN/System.err(21868):     at 
com.dd.plist.BinaryPropertyListParser.parseObject(BinaryPropertyListParser.java:
298)
08-05 10:04:20.000: WARN/System.err(21868):     at 
com.dd.plist.BinaryPropertyListParser.parseObject(BinaryPropertyListParser.java:
337)
08-05 10:04:20.000: WARN/System.err(21868):     at 
com.dd.plist.BinaryPropertyListParser.parse(BinaryPropertyListParser.java:96)
08-05 10:04:20.000: WARN/System.err(21868):     at 
com.dd.plist.BinaryPropertyListParser.parse(BinaryPropertyListParser.java:109)
08-05 10:04:20.000: WARN/System.err(21868):     at 
com.dd.plist.PropertyListParser.parse(PropertyListParser.java:104)



Original issue reported on code.google.com by [email protected] on 5 Aug 2011 at 6:00

Fix for negative INTEGER values problem in binary format

Hi,

I've attached a patch that fixes a problem with negative integer NSNumbers 
(there already was a remark in the code). In Java, all int and long values are 
signed. Therefore, the simple test, e.g. "<256" for a 1-byte-representation is 
not sufficient. Instead, all negative values have to be stored in 8 bytes since 
the most significant bit (the sign) is is set.

Similarily, BinaryPropertyListWriter.writeIntHeader(int) can not handle 
negative values. Instead of correcting this, I've only added an assertion. This 
is because any use of that method only deals with sizes of objects, which are 
>= 0 by nature.

Please consider to apply this patch.

Have fun!


PS: Small copy-and-paste-bug on the example Wiki page: When adding "Lisa", you 
should consistently use "person2"...

Original issue reported on code.google.com by [email protected] on 18 Aug 2011 at 12:48

Attachments:

NSDictionary allows null values which cause an NPE when building pList

If you create an NSDictionary and call put(String, null) this causes the 
dictionary to enter an invalid state.  When you build you get an NPE.

It makes sense for the put(String, Object) method to delegate the call through 
to put(String, NSObject) and to only allow an entry if the object is not null.

It might also make sense to remove the other put and containsValue methods to 
avoid confusion.  As you now have put(String, Object) and containsValue(Object 
value), this handles everything those methods used to.  Otherwise you need to 
start adding containsValue(int) (and anything else that is missing), which 
seems a little pointless.

Attached file contains fixes.

Original issue reported on code.google.com by [email protected] on 16 May 2013 at 10:58

Attachments:

Support for Comments on ASCII property list files

Ascii property list files can make use of comments heavily. It would be great 
if plist did not fail when parsing them, it would be fantastic if it can 
preserve them. This feature is essential for parsing XCode project files 
(.pbxproj). 

I am also attaching a small patch that I use to treat all comments as 
whitespace.



Original issue reported on code.google.com by [email protected] on 27 Feb 2013 at 7:18

Attachments:

I cannot read this plist

please help me, i want to read this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>frames</key>
    <dict>
        <key>%.png</key>
        <dict>
            <key>id</key>
            <integer>26038</integer>
            <key>x</key>
            <real>928</real>
            <key>y</key>
            <real>0</real>
            <key>width</key>
            <real>16</real>
            <key>height</key>
            <real>16</real>
            <key>offsetX</key>
            <real>0</real>
            <key>offsetY</key>
            <real>-0</real>
            <key>originalWidth</key>
            <real>16</real>
            <key>originalHeight</key>
            <real>16</real>
        </dict>
        <key>connecting.png</key>
        <dict>
            <key>id</key>
            <integer>26048</integer>
            <key>x</key>
            <real>679</real>
            <key>y</key>
            <real>108</real>
            <key>width</key>
            <real>68</real>
            <key>height</key>
            <real>68</real>
            <key>offsetX</key>
            <real>0</real>
            <key>offsetY</key>
            <real>-0</real>
            <key>originalWidth</key>
            <real>68</real>
            <key>originalHeight</key>
            <real>68</real>
        </dict>
        <key>grass.png</key>
        <dict>
            <key>id</key>
            <integer>26044</integer>
            <key>x</key>
            <real>596</real>
            <key>y</key>
            <real>0</real>
            <key>width</key>
            <real>330</real>
            <key>height</key>
            <real>18</real>
            <key>offsetX</key>
            <real>0</real>
            <key>offsetY</key>
            <real>-0</real>
            <key>originalWidth</key>
            <real>330</real>
            <key>originalHeight</key>
            <real>18</real>
        </dict>
        <key>grass_1.png</key>
        <dict>
            <key>id</key>
            <integer>26004</integer>
            <key>x</key>
            <real>0</real>
            <key>y</key>
            <real>724</real>
            <key>width</key>
            <real>160</real>
            <key>height</key>
            <real>118</real>
            <key>offsetX</key>
            <real>0</real>
            <key>offsetY</key>
            <real>-0</real>
            <key>originalWidth</key>
            <real>160</real>
            <key>originalHeight</key>
            <real>118</real>
        </dict>
<dict>

Original issue reported on code.google.com by [email protected] on 5 Sep 2013 at 5:26

NS String doesn't encode all XML characters that require encoding

What steps will reproduce the problem?
1. Take a string such as Karl's iPad
2. Wrap this as NSString and encode this to XML
3. View the output

What is the expected output? What do you see instead?
Instead of encoding this, the value is output as-is.

What version of the product are you using? On what operating system?
1.8

Please provide any additional information below.
See notes here 
http://stackoverflow.com/questions/1091945/where-can-i-get-a-list-of-the-xml-doc
ument-escape-characters

Original issue reported on code.google.com by [email protected] on 3 Sep 2014 at 9:59

XMLPropertyListParser throws NPE on empty data node.

What steps will reproduce the problem?
1- XMLPropertyListParser.parse on a plist containing an empty data node.

For instance :
<key>SIMGID1</key>
<data/>
<key>SIMGID2</key>
<data/>

Throws a NPE here :
http://code.google.com/p/plist/source/browse/trunk/src/main/java/com/dd/plist/XM
LPropertyListParser.java#222

 if (n.getChildNodes().getLength() > 0) {
        return new NSData(n.getChildNodes().item(0).getNodeValue());
 } else {
        return new NSData((byte[]) null);
 }

fixes it. All data type seem to have the same issue.

version : r73.




Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 3 Mar 2013 at 4:14

add overloaded method for saveAsXML that takes an OutputStream

This is really an enhancement request. I have a need to have an overloaded 
saveAsXML method that can be implemented as follows:

    /**
     * Saves a property list with the given object as root into a XML file.
     * @param root The root object.
     * @param out The output file.
     * @throws IOException When an error occurs during the writing process.
     */
    public static void saveAsXML(NSObject root, File out) throws IOException {
        File parent = out.getParentFile();
        if(!parent.exists()) {
            parent.mkdirs();
        }

        saveAsXML(root, new FileOutputStream(out));
    }

    /**
     * Saves a property list with the given object as root into a XML file.
     * @param root The root object.
     * @param out The OutputStream to write to.
     * @throws IOException When an error occurs during the writing process.
     */
    public static void saveAsXML(NSObject root, OutputStream out) throws IOException {
    OutputStreamWriter w = new OutputStreamWriter(out, "UTF-8");
        w.write(root.toXMLPropertyList());
        w.close();
    } 


This library is a wonderful implementation that performs beautifully. I have 
made the above modification to the source and it works as expected. It is up to 
the caller to ensure that the directory structure to the file exists prior to 
creating the OutputStream, otherwise an IOException will be thrown, but this is 
expected behavior. 

Thanks very much for the efforts.
Chris

Original issue reported on code.google.com by [email protected] on 20 Feb 2013 at 3:25

Support for date formats

As of now, the library returns a date format which might be a little difficult 
to use right-away.

Can you please add support for additional date formats.

Original issue reported on code.google.com by [email protected] on 3 Sep 2012 at 3:34

Better generic support in NSArray in order to have typed arrays of NSDictionary, NSNumber, etc

Hi,
Thanks for the excellent and very helpful lib.

I found painful to cast each element when iterating elements of an NSArray that 
were childs of NSObject elements(NSDictionary, NSNumber).

I wanted to write something like this: List<NSDictionary> list = 
((NSArray<NSDictionary>) dictionary.objectForKey(key)).getArray();

Here's a fork that allow it (switch from java array to collections and add 
generic type NSArray<T>)
https://github.com/lukaspili/Plist-Java-Android-Library

Cheers,
Lukas

Original issue reported on code.google.com by [email protected] on 8 Dec 2013 at 8:17

UTF-16-BE Strings are not properly parsed

The length of a UTF-16-BE string appears to be expressed in the number of 
double bytes and not single bytes. The current code incorrectly parses the 
attached file -- the string is truncated to half its correct length.

I fixed the problem by multiplying the length by two, in the 0x6 case:

                    if (intLength < 3) {
                        length = (int) parseUnsignedInt(copyOfRange(bytes, offset + 2, offset + 2 + intLength)) * 2;
                    } else {
                        length = new BigInteger(copyOfRange(bytes, offset + 2, offset + 2 + intLength)).intValue() * 2;
                    }


Original issue reported on code.google.com by [email protected] on 28 May 2011 at 2:42

Attachments:

Set private constructor of PropertyListParser to protected to allow subclassing.

What steps will reproduce the problem?
1. subclass PropertyListParser

What is the expected output? What do you see instead?
Expected : no errors
Instead : "Error : Implicit super constructor PropertyListParser() is not 
visible for default constructor. Must define an explicit constructor"

What version of the product are you using? On what operating system?
r99 on eclipse Juno MacOS X

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 9 Apr 2013 at 9:56

Problem working with emoji characters


What steps will reproduce the problem?

iOS 5 now allows the use emoji characters, which are 4-byte unicode characters. 
 These don't seem to parse correctly.

1. Create a binary plist with string value of "Test 😃"
2. Parse
3. While the string seems to get parsed correctly, trying to save it to MySql 
fails with "Incorrect string value: '\xF0\x9F\x98\x83' for column 'content' at 
row 1"
4. If I try saving hard-coded "Test 😃" directly, rather than getting it from 
the plist, I am able to save w/o any issues.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
r55.

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 30 Nov 2011 at 4:48

Parsing a plist with an empty key throws a NPE

What steps will reproduce the problem?
1. https://gist.github.com/nicegraham/5635275
2. when the parser hits this line 
https://gist.github.com/nicegraham/5635275#file-test-plist-L4344 a NPE is thrown

What is the expected output? What do you see instead?
the plist is parsed

What version of the product are you using? On what operating system?
1.0

Original issue reported on code.google.com by [email protected] on 23 May 2013 at 11:04

ns array parsing bug

the problem is that if the root element is an array, you simple assume that 
there are only 1 element in XMLPropertyListParser.java, at function 
parseDocument(Document doc), where if the List of nodes is greater than 1 means 
that it is an array. this can simple be fixed by the supplied file.

Original issue reported on code.google.com by [email protected] on 1 Dec 2012 at 12:42

Attachments:

Compatibility with J2ME

What steps will reproduce the problem?
I am trying to use this library for a BlackBerry project using Eclipse IDE.

I have added the dd-plist.jar file to projects build-path. When I launch my 
application in Simulator it gives me the Error starting App: Module 'dd-plist' 
not found.

I have searched regarding it and found that the dd-plist is not preverified.

Now, when I preverify the jar file it is giving me the following error:
"Error preverifying class Test
    VERIFIER ERROR Test.main([Ljava/lang/String;)V:
Cannot find class java/awt/Frame"

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
dd-plist-r59.zip

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 20 Feb 2012 at 10:45

java.lang.ClassCastException: android.content.res.AssetManager$AssetInputStream cannot be cast to com.dd.plist.Base64$InputStream

What steps will reproduce the problem?

try {
   InputStream is = (InputStream)      this.getResources().openRawResource(R.raw.page001);
  NSDictionary rootDict = (NSDictionary)PropertyListParser.parse(is);
 TV.setText(rootDict.count());
 Log.e("tttttt",""+rootDict.count());  
} catch(Exception ex) {
TV.setText(ex.toString());
Log.e("tttttt", ex.toString());
}

What is the expected output? What do you see instead?
Exception 
java.lang.ClassCastException: android.content.res.AssetManager$AssetInputStream 
cannot be cast to com.dd.plist.Base64$InputStream

What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 17 Aug 2014 at 6:15

Attachments:

pbxproj needs strings encoding

Hi there,
I'm trying to parse, edit and than write a .pbxproj file from Xcode 4.6.2 
project. It seams to use some mixed style of ASCII and GnuStepASCII format. The 
difference to the ASCII is that strings are encoded. Please check out the 
attachment line 700. This a valid .pbxproj file, checked on Xcode 4.6.2.

So the question is what happens if we go and encode strings in ASCII or is it 
better to introduce a new "type" with separate method like 
"convertToXcodePlist"?

Thanks, Artem.

Original issue reported on code.google.com by [email protected] on 10 May 2013 at 12:03

Attachments:

Build of PLists files with test errors

Hello there.

The Last commits (103 & 104) seems to break some test-cases.


see: https://cleopatra.consolving.de/jenkins/job/net.sf.plist/7/console

Maybe it is worth a look :-):

Original issue reported on code.google.com by [email protected] on 3 Nov 2012 at 12:39

Unable to parse some UTF-8 characters

Great product -- thanks a lot for your work!

What steps will reproduce the problem?
1. Create a binary plist with string value of "yés"
2. Parse
3. String gets parsed as "yé", the rest gets cut off, no matter how many 
characters follow "é"

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
r21

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 30 Jul 2011 at 4:33

Enhancement/Patch Request: XML Generation via DocumentBuilder

I've adapted your framework to generate the XML version of the plist via the 
DocumentBuilder wrappers, as a more OO approach to task instead of 

I was curious if the project maintainers would would be interested in looking 
at it to see if it would be worth inclusion or for inspiration.

Original issue reported on code.google.com by [email protected] on 5 Aug 2011 at 5:40

does not run on JRE 5

is it possible to compile the lib with "-target 1.5" ?

otherwise it wouldn't run under websphere 6.1 which is unfortunately still 
popular enough...


Original issue reported on code.google.com by [email protected] on 18 Jul 2011 at 5:29

BinaryPropertyListParser does not parse appleId

What steps will reproduce the problem?
File file = new File("iTunesMetadata.plist");
NSDictionary rootDict = (NSDictionary) PropertyListParser.parse(file);          

for (int i = 0; i < rootDict.allKeys().length; i++) {
                System.out.print(rootDict.allKeys()[i] + ": ");
                System.out.println(rootDict.objectForKey(rootDict.allKeys()[i]).toString());
}

What is the expected output? What do you see instead?
The output of the above for-loop should contain the appleId "[email protected]". 
But this appleId is not listed.

What version of the product are you using? On what operating system?
plist-r7 and latest from public svn directory. Operating system is linux.

Original issue reported on code.google.com by [email protected] on 1 Apr 2011 at 8:19

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.