$ cat unicode.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
'ö'
$ autopep8 -i unicode.py
$ pyformat -i unicode.py
Traceback (most recent call last):
File "/usr/local/bin/pyformat", line 42, in <module>
standard_error=sys.stderr))
File "/usr/local/lib/python2.7/dist-packages/pyformat.py", line 179, in main
format_multiple_files(set(args.files), args, standard_out, standard_error)
File "/usr/local/lib/python2.7/dist-packages/pyformat.py", line 126, in format_multiple_files
_format_file((name, args, standard_out, standard_error))
File "/usr/local/lib/python2.7/dist-packages/pyformat.py", line 104, in _format_file
format_file(*parameters[:-1])
File "/usr/local/lib/python2.7/dist-packages/pyformat.py", line 79, in format_file
formatted_source = format_code(source, aggressive=args.aggressive)
File "/usr/local/lib/python2.7/dist-packages/pyformat.py", line 64, in format_code
formatted_source = fix(formatted_source)
File "/usr/local/lib/python2.7/dist-packages/pyformat.py", line 54, in <lambda>
yield lambda code: autopep8.fix_string(code, options=autopep8_options)
File "/usr/local/lib/python2.7/dist-packages/autopep8.py", line 1941, in fix_string
source = source.decode(locale.getpreferredencoding(False))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 44: ordinal not in range(128)