SaCarde
Byte Order Mark
Byte Order Mark: BOM
sequenza di byte che viene posizionata all'inizio di un file, per indicarne il tipo di codifica Unicode.
UTF-32, big-endian 00 00 FE FF
UTF-32, little-endian FF FE 00 00
UTF-16, big-endian FE FF
UTF-16, little-endian FF FE
UTF-8 EF BB BF
- per inserire il BOM:
1. printf 'xEFxBBxBF' > ...
2. da vi/vim col comando: :set bomb
- per togliere il BOM:
1. da vi/vim col comando: :set nobomb
P.S. verifiche:
file p2
p2: Bourne-Again shell script, UTF-8 Unicode (with BOM) text executable
file p1
p1: Bourne-Again shell script, ASCII text executable
hexdump -C p2
00000000 ef bb bf 23 21 2f 62 69 6e 2f 62 61 73 68 0a ...#!/bin/bash.
hexdump -C p1
00000000 23 21 2f 62 69 6e 2f 62 61 73 68 0a #!/bin/bash.
p.s.
magic number:
http://appunti.linux.it/a2/a241.htm#almlindex2680
Le ultime notizie relative a questo argomento





























































Tutte le notizie relative a questo argomento