Solve issues relates do character encoding #308
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solve issues #286, #239 and #153.
The approach here is to use unicode string all the way, and encode it to the system default encoding only when writing to console or file. It changes a bit how things are done in "stuff.py" and "reports.py", formatting all strings in unicode before encoding to the system charset.
I removed some hardcoded "utf-8" encodings, converting it to Unicode strings.
For me, it solved all the encoding issues that where making hamster unusable in my system. I hope it work for you all too.
There is some risk of this patch breaking something related to bug 562298 (encoding issue with Japanese locale). I think it will not break, but I was unable to test it. If someone that uses Japanese locale can test, I will be glad.
I can spare some more hours to work with hamster, so, if anyone thinks any bug is really annoying, please, let me know.