robcowie / SublimeTODO

**[DEPRECATED]** - See https://github.com/jonathandelgado/SublimeTodoReview - Extract TODO-type comments from open files and project folders
295 stars 54 forks source link

UnicodeDecodeError on non-ascii results #3

Closed robcowie closed 12 years ago

robcowie commented 12 years ago

When building the result output, the matched string is implicitly decoded. It fails if it cannot be decoded as ascii.

Is there a fast way of determining the encoding of a file? If not, perhaps just try utf8, else use ST2 fallback_encoding

robcowie commented 12 years ago

Right now, input (matched messages) is assumed to be utf8 and decoded with the ignore flag.

No attempt is made to detect the encoding of the target file. This is obviously not ideal behaviour but it does at least prevent failures due to encoding issues. I'll revisit this stuff it it proves to be an issue.