mgaitan / waliki

A wiki engine powered by Django and Git
http://waliki.pythonanywhere.com
BSD 3-Clause "New" or "Revised" License
309 stars 56 forks source link

Fix UnicodeDecodeError in waliki.git.view. #58

Closed loganchien closed 9 years ago

loganchien commented 9 years ago

Under some locale settings (e.g. zh_TW.UTF-8) the byte string can't be properly decoded as unicode string and result in UnicodeDecodeError.

This CL fix the problem by writing the byte string in UTF-8 and decode them with django.utils.encoding.smart_text().

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.33%) when pulling 35ca7243189ee3d364a26eae04e824c4b09a6ef3 on loganchien:master into 1d613cd1748e875e06820aa9d2d7ee0aecea32a2 on mgaitan:master.

mgaitan commented 9 years ago

Thank you very much!