Outils pour utilisateurs

Outils du site


tech:caractere_speciaux_unicode_utf8

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:caractere_speciaux_unicode_utf8 [2026/06/19 11:19] Jean-Baptistetech:caractere_speciaux_unicode_utf8 [2026/06/19 16:14] (Version actuelle) Jean-Baptiste
Ligne 41: Ligne 41:
 Donne : ✗ Donne : ✗
  
-https://fr.wikipedia.org/wiki/Coche_%28typographie%29 +Voir : 
- +  * https://fr.wikipedia.org/wiki/Coche_%28typographie%29 
-https://en.wikipedia.org/wiki/Unicode_input +  https://en.wikipedia.org/wiki/Unicode_input 
- +  https://fr.wikipedia.org/wiki/Aide:Caract%C3%A8res_sp%C3%A9ciaux_probl%C3%A9matiques 
-https://fr.wikipedia.org/wiki/Aide:Caract%C3%A8res_sp%C3%A9ciaux_probl%C3%A9matiques +  http://michal.kosmulski.org/computing/articles/linux-unicode.html
- +
-http://michal.kosmulski.org/computing/articles/linux-unicode.html+
  
  
Ligne 112: Ligne 110:
 ~~~ ~~~
  
 +
 +### Pb accent - grep ou diff
 +
 +Diff NOK lors de :
 +~~~bash
 +docker exec 171daa9d9f62 cat plop.txt > /tmp/plop.txt
 +diff /tmp/plop.txt <(docker exec 171daa9d9f62 cat plop.txt)
 +~~~
 +
 +Et grep message `binary file matches` alors qu'il s'agit bien d'un fichier texte.
 +
 +~~~
 +$ grep red /tmp/plop.txt
 +grep: /tmp/plop.txt: binary file matches
 +
 +$ file plop.txt
 +plop.txt: ISO-8859 text
 +
 +$ grep --text red /tmp/plop.txt | cat -A
 +## environnement redondM-i$
 +
 +$ grep --text red /tmp/plop.txt | grep red
 +grep: (standard input): binary file matches
 +
 +$ grep --text red /tmp/plop.txt | sed -e 's/\xe9//g' | grep red
 +## environnement redond
 +~~~
 +
 +Le caractère E9 est pourtant un caractère correcte en ASCII étendue
 +
 +
 +## Solution
 +
 +* Supprimer les caracères non ASCII
 +* Ou utiliser `unaccent`
 +
 +~~~code
 +unaccent ISO-8859-1 /tmp/plop.txt
 +~~~
  
  
tech/caractere_speciaux_unicode_utf8.1781860773.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki