##### SUMMARY

The unarchive integration test fails when LC_ALL is not set.

##### ISSUE TYPE

Bug Report

##### COMPONENT NAME

unarchive

##### ANSIBLE VERSION

devel

##### CONFIGURATION

N/A

##### OS / ENVIRONMENT

N/A

##### STEPS TO REPRODUCE

1. Set `ansible_connection=ssh ansible_host=localhost` for `testhost` to prevent modules from inheriting the environment from the controller: https://github.com/ansible/ansible/blob/edcb5b6775adac09eee5412b499b8f0aa5194610/test/integration/inventory#L6
2. Run the test in an environment where LC_ALL is not set by default: `ansible-test integration unarchive --remote freebsd/12.0 -v`

##### EXPECTED RESULTS

Tests pass.

##### ACTUAL RESULTS

Tests traceback:

```
TASK [unarchive : test that unarchive works with an archive that contains non-ascii filenames] **************************************************************************
fatal: [testhost]: FAILED! => {"changed": false, "module_stderr": "Shared connection to localhost closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/root/.ansible/tmp/ansible-tmp-1561576726.3763218-37161750934991/AnsiballZ_unarchive.py\", line 139, in <module>\r\n    _ansiballz_main()\r\n  File \"/root/.ansible/tmp/ansible-tmp-1561576726.3763218-37161750934991/AnsiballZ_unarchive.py\", line 131, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/root/.ansible/tmp/ansible-tmp-1561576726.3763218-37161750934991/AnsiballZ_unarchive.py\", line 65, in invoke_module\r\n    spec.loader.exec_module(module)\r\n  File \"<frozen importlib._bootstrap_external>\", line 678, in exec_module\r\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\r\n  File \"/tmp/ansible_unarchive_payload_o9_x930g/__main__.py\", line 909, in <module>\r\n  File \"/tmp/ansible_unarchive_payload_o9_x930g/__main__.py\", line 859, in main\r\n  File \"/usr/local/lib/python3.6/genericpath.py\", line 42, in isdir\r\n    st = os.stat(s)\r\nUnicodeEncodeError: 'ascii' codec can't encode characters in position 51-54: ordinal not in range(128)\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
```

Failure on Shippable: https://app.shippable.com/github/ansible/ansible/runs/129521/18/tests
unarchive:
    src: /tmp/foo.zip
    dest: /usr/local/bin
    extra_opts:
    - --transform
    - s/^xxx/yyy/
'''
import binascii
import codecs
import datetime
import fnmatch
import grp
import os
import platform
import pwd
import re
import stat
import time
import traceback
from zipfile import ZipFile, BadZipfile
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.urls import fetch_file
from ansible.module_utils._text import to_bytes, to_native, to_text
try:  
    from shlex import quote
except ImportError:  
    from pipes import quote
OWNER_DIFF_RE = re.compile(r': Uid differs$')
GROUP_DIFF_RE = re.compile(r': Gid differs$')
MODE_DIFF_RE = re.compile(r': Mode differs$')