Quote:
Originally Posted by macr0t0r
... First off, the \U tag has proven to be unreliable with some fonts, and it's a train-wreck on Symbian devices.
|
Good to know. That code is from calibre's PML output and I only test against the desktop software with the standard font. Looking at the
docs it seem that \\U only supports certain fonts and versions.
Quote:
Originally Posted by macr0t0r
Second, I don't believe there are extended codes for \x80 and \x81.
|
Looks like there isn't.
Quote:
Originally Posted by macr0t0r
However, this is a fascinating little trick. Perhaps this could work?
Code:
text = re.sub('[\x82-\xff]', lambda x: '\\a%03d' % ord(x.group()), text)
Then, perhaps I could fall back to unicode for whatever is left:
Code:
text = re.sub('[^\x00-\xff]', lambda x: '\\U%04x' % ord(x.group()), text)
|
This will work very well inside of the eReader script because you should never encounter characters that are not defined by either the \\a or \\U tags.