diff --git a/news/78.bugfix.rst b/news/78.bugfix.rst new file mode 100644 index 0000000..bee3e3a --- /dev/null +++ b/news/78.bugfix.rst @@ -0,0 +1 @@ +Fixed a bug in ``vistir.misc.locale_encoding`` which caused invocation of a non-existent method called ``getlocaleencoding`` which forced all systems to use default encoding of ``ascii``. diff --git a/src/vistir/misc.py b/src/vistir/misc.py index fe88dc1..23b5999 100644 --- a/src/vistir/misc.py +++ b/src/vistir/misc.py @@ -514,7 +514,7 @@ def chunked(n, iterable): try: - locale_encoding = locale.getdefaultencoding()[1] or "ascii" + locale_encoding = locale.getdefaultlocale()[1] or "ascii" except Exception: locale_encoding = "ascii"