juanantoniofm / pythoniter

Little python formatter-beautifier online (web) implemented in appengine
46 stars 15 forks source link

Fails to parse UTF-8 source files #7

Open Pzixel opened 6 years ago

Pzixel commented 6 years ago

Sample input

# -*- coding: utf-8 -*-
a = 5 # устанавлеваем a в 5 

Expected result

format is successful

Actual result

Traceback (most recent call last): UnicodeEncodeError: 'ascii' codec can't encode characters in position 2-14: ordinal not in range(128)

juanantoniofm commented 6 years ago

Thanks for submitting this issue. It is indeed a very ugly result. I will try to find a fix next time I work on the tool. (Which should be soon).