Changeset 269

Show
Ignore:
Timestamp:
09/29/05 12:05:32 (19 years ago)
Author:
jerome
Message:

Fixed some PJL escaping issues

Location:
pkpgcounter/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • pkpgcounter/trunk/NEWS

    r267 r269  
    2222pkpgcounter News : 
    2323    
     24  * 1.70 : 
     25   
     26    - Fixed some PJL escaping issue in the PCLXL and PCL3/4/5 parsers. 
     27     
    2428  * 1.69 : 
    2529   
  • pkpgcounter/trunk/pkpgpdls/pcl345.py

    r267 r269  
    150150                    if minfile[pos : pos+8] == r"%-12345X" : 
    151151                        endpos = pos + 9 
    152                         while (minfile[endpos] not in endmark) and (minfile[endpos] < asciilimit) : 
     152                        quotes = 0 
     153                        while (minfile[endpos] not in endmark) and \ 
     154                              ((minfile[endpos] < asciilimit) or (quotes % 2)) : 
     155                            if minfile[endpos] == '"' : 
     156                                quotes += 1 
    153157                            endpos += 1 
    154158                        self.setPageDict(pages, pagecount, "escaped", minfile[pos : endpos]) 
  • pkpgcounter/trunk/pkpgpdls/pclxl.py

    r266 r269  
    259259            endmark = chr(0x0c) + chr(0x00) + chr(0x1b) 
    260260            asciilimit = chr(0x80) 
    261             while (self.minfile[endpos] not in endmark) and (self.minfile[endpos] < asciilimit) : 
     261            quotes = 0 
     262            while (self.minfile[endpos] not in endmark) and \ 
     263                   ((self.minfile[endpos] < asciilimit) or (quotes % 2)) : 
     264                if self.minfile[endpos] == '"' : 
     265                    quotes += 1 
    262266                endpos += 1 
    263267                 
  • pkpgcounter/trunk/pkpgpdls/version.py

    r267 r269  
    2020# 
    2121 
    22 __version__ = "1.69" 
     22__version__ = "1.70" 
    2323 
    2424__doc__ = """pkpgcounter : a generic Page Description Languages parser."""