Changeset 2485

Show
Ignore:
Timestamp:
11/10/08 06:14:03 (2 months ago)
Author:
bzr
Message:

Filter out NULL characters before sending to liblouis for translation. Fixes some issues such as the Windows Vista clock not showing the time in braille, and possibly braille representation of QT widgets.

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk

    • Property bzr:revision-info
      •  

        old new  
        1 timestamp: 2008-11-10 13:07:43.644000053 +1100 
         1timestamp: 2008-11-10 16:50:22.122999907 +1100 
        22committer: Michael Curran <mick@kulgan.net> 
        33properties:  
    • Property bzr:revision-id:v3-list-QlpoOTFBWSZTWbrL2vUAAB1VgAAQABCAQDrrnqAgAFCgaaGRkxBoTIJ6mmaNRwhndFAoNhZjh_YY4a01fOg1ulgNNC2UrzPdXXEnDpX8XckU4UJC6y9r1A..
      •  

        old new  
        2542542282 mick@kulgan.net-20081109224919-7rp3kij24boyy66f 
        2552552283 mick@kulgan.net-20081110020743-z5y2l2uchybtavtu 
         2562284 mick@kulgan.net-20081110055022-1b6u96h2aynehk83 
    • Property bzr:file-ids
      •  

        old new  
        1 source/synthDrivers/sapi4.py    sapi4.py-20081105062308-fz5mgli5iso5vcdq-2 
         1source/braille.py       braille.py-20080908070240-tjwqjsv7drp1kt8c-1 
  • trunk/source/braille.py

    r2474 r2485  
    141141                if config.conf["braille"]["expandAtCursor"] and self.cursorPos is not None: 
    142142                        mode |= louis.compbrlAtCursor 
    143                 braille, self.brailleToRawPos, self.rawToBraillePos, brailleCursorPos = louis.translate([os.path.join(TABLES_DIR, config.conf["braille"]["translationTable"])], unicode(self.rawText), mode=mode, cursorPos=self.cursorPos or 0) 
     143                text=unicode(self.rawText).replace('\0','') 
     144                braille, self.brailleToRawPos, self.rawToBraillePos, brailleCursorPos = louis.translate([os.path.join(TABLES_DIR, config.conf["braille"]["translationTable"])], text, mode=mode, cursorPos=self.cursorPos or 0) 
    144145                # liblouis gives us back a character string of cells, so convert it to a list of ints. 
    145146                # For some reason, the highest bit is set, so only grab the lower 8 bits.