bugGNUstep - Bugs: bug #37283, Invalid result of parsing...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

bug #37283: Invalid result of parsing XML-based plist

Submitted by:  Vitaliy <vmyrik>
Submitted on:  Thu 06 Sep 2012 09:58:33 AM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: In Test

Thu 06 Sep 2012 02:39:12 PM UTC, comment #2:

I have attached plist that I try to parse. After pulling from master (rev 35533) I get the following:

{"

lookAheadForRow" = 3; lookAheadForSymbol = 3; maxNormalizedDistance = "0.01"; maxRowEndDarkness = 1; minRowBeginDarkness = 1; spaceHeight = 1; spaceWidth = 4; symbols = {" " = "space.gif"; "(" = "parenthesis_open_1.gif"; ")" = "parenthesis_close_1.gif"; "+" = "plus.gif"; "," = "comma.gif"; "-" = "hyphen.gif"; 0 = "0.gif"; 1 = "1.gif"; 2 = "2.gif"; 3 = "3.gif"; 4 = "4.gif"; 5 = "5.gif"; 6 = "6.gif"; 7 = "7.gif"; 8 = "8.gif"; 9 = "9.gif"; ";" = "semicolon.gif"; }; threshold = "0.5"; }

There are some white-spaces before lookAheadForRow that really should not be there.
Btw, thx for quick fix.

(file #26489)

Vitaliy <vmyrik>
Thu 06 Sep 2012 12:59:32 PM UTC, comment #1:

Thanks ... I checked the DTD and it is supposed to keep whitespace in a key ... so I've modified the xml plist parsing so that it shoudl now do that.

Richard Frith-Macdonald <CaS>
Project Member
Thu 06 Sep 2012 09:58:33 AM UTC, original submission:

I have an XML-based plist and inside it there is a dictionary that contains a white-space as a key, among the other things. When I try to load this plist using [[NSDictionary alloc] initWithContentsOfFile:] I get an empty string for this key instead of white space.
Data looks like:
<dict>
...
<key> </key>
<string>space.tiff<string>
...
</dict>
P.S. I'm non-native speaker, so please accept my apologies for any errors that may found here.

Vitaliy <vmyrik>

 

Attached Files
file #26489:  Properties.plist added by vmyrik (1kB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by vmyrik (Submitted the item)
  • -unavailable- added by vmyrik
  • -unavailable- added by vmyrik
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 06 Sep 2012 02:39:12 PM UTCvmyrikAttached File-=>Added Properties.plist, #26489
    Thu 06 Sep 2012 12:59:32 PM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>In Test
    Thu 06 Sep 2012 09:58:33 AM UTCvmyrikCarbon-Copy-=>Added -unavailable-
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup