On 9/11/19 11:23 AM, Daniel P. Berrangé wrote:
Python3 versions less than 3.7 have very unhelpful handling
of the C locale where they assume data is 7-bit only. This
violates POSIX which requires the C locale to be 8-bit clean.
Python3 >= 3.7 now assumes that the C locale is always UTF-8.
Being UTF-8 vs. being 8-bit clean are not necessarily synonymous, but
the difference shouldn't matter when we only use UTF-8 encoding in our
script source code and inputs.
Set env variables to force LC_CTYPE to en_US.UTF-8 so that
we get UTF-8 handling on all python versions. Note we do
not use C.UTF-8 since not all C libraries support that.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Makefile.am | 2 +-
configure.ac | 8 ++++++++
docs/Makefile.am | 3 ++-
src/esx/Makefile.inc.am | 2 +-
src/hyperv/Makefile.inc.am | 2 +-
src/util/Makefile.inc.am | 8 ++++----
6 files changed, 17 insertions(+), 8 deletions(-)
Reviewed-by: Eric Blake <eblake(a)redhat.com>
+++ b/src/esx/Makefile.inc.am
@@ -63,7 +63,7 @@ $(ESX_DRIVER_GENERATED): $(ESX_GENERATED_STAMP)
$(ESX_GENERATED_STAMP): $(srcdir)/esx/esx_vi_generator.input \
$(srcdir)/esx/esx_vi_generator.py
- $(AM_V_GEN)srcdir=$(srcdir) $(PYTHON) $(srcdir)/esx/esx_vi_generator.py \
+ $(AM_V_GEN)srcdir=$(srcdir) $(RUNUTF8) $(PYTHON) $(srcdir)/esx/esx_vi_generator.py \
&& touch $@
Worth rewrapping long lines any differently, since your addition pushes
this beyond 80 columns?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization:
qemu.org |
libvirt.org