Ticket #21: pclxl.py.patch

File pclxl.py.patch, 1.0 kB (added by jerome, 16 years ago)

Simple patch to fix the problem

  • pclxl.

    old new  
    8787        if (((self.firstblock[:128].find("\033%-12345X") != -1) and \ 
    8888             (self.firstblock.find(" HP-PCL XL;") != -1) and \ 
    8989             ((self.firstblock.find("LANGUAGE=PCLXL") != -1) or \ 
    90               (self.firstblock.find("LANGUAGE = PCLXL") != -1)))) \ 
     90              (self.firstblock.find("LANGUAGE = PCLXL") != -1)))) or \ 
     91              (self.firstblock.find("BROTHER XL2HB;") != -1) \ 
    9192             or ((self.firstblock.startswith(chr(0xcd)+chr(0xca)) and (self.firstblock.find(" HP-PCL XL;") != -1))) : 
    9293            return True 
    9394        else :     
     
    378379            line = self.infile.readline() 
    379380            if not line : 
    380381                break 
    381             pos = line.find(" HP-PCL XL;")     
     382            pos = line.find(" HP-PCL XL;") 
     383            if pos == -1 : 
     384                pos = line.find(" BROTHER XL2HB;") 
    382385            if pos != -1 : 
    383386                found = True 
    384387                endian = ord(line[pos - 1])