Skip to content
Browse files

Use locale.getpreferredencoding()

  • Loading branch information...
1 parent f4058e7 commit da7c6ad91100bb9f688372bcfec829053ced72e5 @myint myint committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 test/test.py
View
3 test/test.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+import locale
import os
import sys
import unittest
@@ -31,7 +32,7 @@ def run_completer(self, parser, command, point=None):
with self.assertRaises(SystemExit):
autocomplete(parser, output_stream=t, exit_method=sys.exit)
t.seek(0)
- return t.read().decode('utf-8').split(IFS)
+ return t.read().decode(locale.getpreferredencoding()).split(IFS)
def test_basic_completion(self):
p = ArgumentParser()

0 comments on commit da7c6ad

Please sign in to comment.
Something went wrong with that request. Please try again.