#1035 Issue closed
: RFC: Have UTF-8 localization support in the rescue/recovery system¶
Labels: enhancement
, won't fix / can't fix / obsolete
jsmeix opened issue at 2016-10-14 07:22:¶
See
https://github.com/rear/rear/issues/1030
(Borg backup restore requires UTF-8 localization support
in the rescue/recovery system).
Because UTF-8 is THE nowadays standard locale
and because UTF-8 is compatible with ASCII
(i.e. UTF-8 is compatible with the POSIX/C locale)
I like to suggest to have in general UTF-8 localization
support in the rescue/recovery system.
Note that I do not request to use a UTF-8 locale
by default in the rescue/recovery system because
this could result different output from tools.
I.e. I want to keep using the POSIX/C locale
by default in the rescue/recovery system
to avoid regressions.
I only request that - if needed - one can switch
to a UTF-8 locale in the rescue/recovery system.
jsmeix commented at 2017-11-07 09:11:¶
The plain UTF-8 encoding is compatible with ASCII but
setting LANG to en_US.UTF-8 is not ASCII compatible,
see this mail
https://lists.opensuse.org/opensuse-packaging/2017-11/msg00006.html
that reads (excerpt):
Setting LANG to en_US.UTF-8 is a horrible idea for scripts ... collating order and ctypes get in the way as it's not ASCII compatible
OliverO2 commented at 2018-01-30 14:29:¶
It is my understanding that UTF-8 character support in ReaR is possible in a backward compatible manner:
Create usr/share/rear/build/default/500_create_locale.sh
as follows:
# Create our own locale
mkdir -p $ROOTFS_DIR/usr/lib/locale
localedef -f UTF-8 -i en_US $ROOTFS_DIR/usr/lib/locale/C.UTF-8
StopIfError "Could not create locale"
Set the locale for character encoding only via export LC_CTYPE=C.UTF-8
(best place yet to be determined).
[Export of Github issue for rear/rear.]