brendonh / pyth

Python text markup and conversion
MIT License
89 stars 79 forks source link

Handle rtf's with missing fontNum in charsetTable #16

Closed MeirKriheli closed 11 years ago

MeirKriheli commented 11 years ago

This simply ignores the situation with broken rtf's, instead of non handled exception.

brendonh commented 11 years ago

I'm not happy about making this the default behaviour, since it will make Pyth quietly output garbage sometimes. I'd be okay with ignoring it when the "errors" flag was "ignore", though. (Although I'm not sure what "replace" would do then -- use a special charset that always gave '?'? ;)

MeirKriheli commented 11 years ago

I see,

Updated the pull request, will ignore errors only if requested, otherwise keeps the current behaviour.

brendonh commented 11 years ago

That works. Thanks!