1.2 KiB
1.2 KiB
LPIC-1 107.3: Localization and internationalization
A second locale, what it changes, sort order, and converting a file from Latin-1 to UTF-8.
Before you start
The lab writes a short list of words in mixed case to /root/words.txt.
The de_DE.UTF-8 locale must not be installed yet; the lab refuses to start
if it is.
Tasks
- Install the
de_DE.UTF-8locale. Comparedate,ls -landprintf "%'d\n" 1234567under it and under your normal locale, withLC_ALL=in front of each. Write what theprintfprints underde_DE.UTF-8to/root/lab-answers/1. - Sort
/root/words.txtunderLC_ALL=Cinto/root/lab-answers/2-c, and underLC_ALL=de_DE.UTF-8into/root/lab-answers/2-de, and compare. - Make a Latin-1 file with
printf 'caf\xe9\n' > /root/latin1.txt, check it withfile, look at it withcat, and convert it to UTF-8 withiconvas/root/utf8.txt.
Hints
- RHEL family:
dnf install glibc-langpack-de. Debian and Ubuntu:locale-gen de_DE.UTF-8(or uncomment it in/etc/locale.genand runlocale-gen). Check withlocale -a. Start a new shell after installing it. LC_ALL=C sort /root/words.txt > ...;diffthe two.iconv -f LATIN1 -t UTF-8;fileon both files.