Ceci est une ancienne révision du document !
Table des matières
Caractère spéciaux Unicode / UTF8
Voir :
Voir aussi :
convmv
Sous ouindoze il suffit de maintenir la touche Alt puis de taper le code ASCII Étendu en décimal avec le pavé numérique.
Ce n'est pas sans faire rappeler “La Matrice” avec la fameuse Libcaca.
Quand est-il sous GNU/Linux ?
Ben, ça fait longtemps que la plupart des distributions sont en UTF-8, donc nous pouvons insérer des caractères Unicode.
Voici comment :
Maintenir simultanément enfoncés les touches Ctrl + Shift + U
Ne marche que sur les applications GTK
Puis tapez le numéro Unicode du symbole souhaité.
Par exemple pour le symbole coché :
Ctrl + Shift + U Puis 2713 Donne: ✓
Ctrl + Shift + U Puis 2717 Donne : ✗
https://fr.wikipedia.org/wiki/Coche_%28typographie%29
https://en.wikipedia.org/wiki/Unicode_input
https://fr.wikipedia.org/wiki/Aide:Caract%C3%A8res_sp%C3%A9ciaux_probl%C3%A9matiques
http://michal.kosmulski.org/computing/articles/linux-unicode.html
Pb
Pb si certains caractères unicode sous Debian ne sont pas afficher correctement
Solution
apt-get install unifont
Avec l'interface graphique
Sinon en outil graphique il existe Gucharmap
apt-get install gucharmap
Pb 'ascii' codec can't encode character
Non 7-Bit ASCII
ERROR keystone.common.wsgi UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 27: ordinal not in range(128)
printf '\ue9' |grep -P '\xe9' #grep '\\C3\\A9'
Pb vim characters "[0m|"
How to remove “[0m|” ? \ Wrong locale
Try
env LC_ALL=en_US.UTF-8 vim README.md # LC_ALL=C.UTF-8
Ou
export LANG=en_US.UTF-8 export LANGUAGE=en_US:en export LC_CTYPE="en_US.UTF-8" export LC_NUMERIC="en_US.UTF-8" export LC_TIME="en_US.UTF-8" export LC_COLLATE="en_US.UTF-8" export LC_MONETARY="en_US.UTF-8" export LC_MESSAGES="en_US.UTF-8" export LC_PAPER="en_US.UTF-8" export LC_NAME="en_US.UTF-8" export LC_ADDRESS="en_US.UTF-8" export LC_TELEPHONE="en_US.UTF-8" export LC_MEASUREMENT="en_US.UTF-8" export LC_IDENTIFICATION="en_US.UTF-8" export LC_ALL=
Autres
/usr/bin/isutf8
mv App.ini.j2 App.ini.j2.bak iconv -f iso-8859-15 -t utf-8 App.ini.j2.bak > App.ini.j2 # convmv -f iso-8859-1 -t utf8 DIR
Exemple
install.sh:4:22: invalid UTF-8 encoding iconv -f iso-8859-15 -t utf-8 install.sh > install2.sh
iconv -f utf-8 -t ascii//TRANSLIT README.md > README2.md
Pb hGetContents: invalid argument (invalid byte sequence)
$ shellcheck plop.sh plop.sh: plop.sh: hGetContents: invalid argument (invalid byte sequence) $ file plop.sh plop.sh: Bourne-Again shell script, ISO-8859 text executable $ iconv -t utf-8 plop.sh > mkiso-debian3.sh iconv: illegal input sequence at position 2582 $ iconv -f iso-8859-1 -t utf-8 plop.sh > plop2.sh
$ file plop* plop1.tcl: Unicode text, UTF-8 text, with CRLF line terminators plop2.tcl: Unicode text, UTF-8 text $ dos2unix plop1.tcl $ dos2unix plop2.tcl $ file plop* plop1.tcl: ISO-8859 text plop2.tcl: ISO-8859 text
diff <(cat -A plop.yml) <(cat plop.yml |sed -e 's/$/$/g' )
