enter_chroot: sanity check locale settings

If people have a misconfigured environment, detect & abort early
rather than fail randomly/mysteriously later on.  We require a
valid UTF-8 compatible locale in order to work.

BUG=chromium:1052082
TEST=CQ passes
TEST=`LANG=C cros_sdk` aborts

Change-Id: I1f331bfbc4031d4178cadaa6d70a8017e1271cde
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/2137986
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
1 file changed