74 lines
1.1 KiB
Plaintext
74 lines
1.1 KiB
Plaintext
I/
|
|
|
|
entrer caractère par caractère.
|
|
ex : 0xc2a5 => 0xa5 => (yens)
|
|
0x2c => ','
|
|
0x20 => ' '
|
|
0xe299a0 => 0x2660 => 'pique (carte)'
|
|
0x2c => ','
|
|
0x20 => ' '
|
|
0xe28497 => 0x2117 =>'(p)'
|
|
0x2c => ','
|
|
0x20 => ' '
|
|
0x24 => '$'
|
|
0x2c => ','
|
|
0x20 => ' '
|
|
0xc2a3 =>
|
|
0x2c => ','
|
|
0x20 => ' '
|
|
0xe282ac =>
|
|
0x2c => ','
|
|
0x20 => ' '
|
|
0x =>
|
|
0x2c => ','
|
|
0x20 => ' '
|
|
0x =>
|
|
0x2c => ','
|
|
0x20 => ' '
|
|
0x =>
|
|
0x2c => ','
|
|
0x20 => ' '
|
|
0x =>
|
|
0x2c => ','
|
|
0x20 => ' '
|
|
|
|
II/
|
|
|
|
1/Echo $<commande>
|
|
|
|
2/read $<variable>
|
|
|
|
3/Read lit l'entrée standart de la variable et retient ce qu'il y a dans le terminal.
|
|
|
|
4/-p
|
|
|
|
5/-m
|
|
|
|
6/;
|
|
|
|
7/read -p "Type var value : " var; echo "var value is : $var"
|
|
|
|
III/
|
|
|
|
|
|
1/"\U$v"
|
|
|
|
2/read -p " " hex; echo -e " \U$hex"
|
|
|
|
3/chmod+x print_unicode_char
|
|
|
|
IV/
|
|
|
|
1/man hexdump : -C
|
|
|
|
2/#!/bin/bash
|
|
|
|
if [ $# -ne 1 ]; then
|
|
echo "Usage: $0 <caractère>"
|
|
exit 1
|
|
fi
|
|
|
|
caractere="$1"
|
|
encodage_utf8=$(printf "%s" "$caractere" | iconv -t UTF-8 | hexdump -C | awk '{print $2}' | tr -d '\n')
|
|
|
|
echo "L'encodage UTF-8 de '$caractere' est : 0x$encodage_utf8" |