-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vincent Jamart wrote:
> Merci pour les infos, Philippe et Alain,
> J'ai pour le moment fait un script comme ceci (sur un poste Linux car le
> shell OS X ne supporte pas é ou à ou è (??? il est installé en français,
> 10.4...lapin compris) Donc linux à la rescousse comme d'habitude:
> #!/bin/bash
> find . -name "*.htm*"|while read line do
> mv $line $line.old
> sed 's/UTF-8/iso-8859-1/g' $line.old >$line
> sed 's/à¨/è/g' $line >$line.old
> sed 's/é/é/g' $line.old >$line
> sed 's/à®/î/g' $line >$line.old
> sed 's/Ã/à/g' $line.old >$line
> mv $line.old $line
> rm $line.old
> done
argh, utilise recode ;))
#!/bin/bash
echo -n 'Converting files: '
find . -name '*.htm' | while read file; do
mv "$file" "${file}.old"
if cat "$file" | sed 's/UTF-8/iso-8859-1/gi' \
| recode UTF8..ISO-8859-1 > "$file"; then
rm -f "${file}.old"
echo -n '.'
else
mv -f "${file}.old" "$file"
echo
echo "ERROR while converting $file" >&2
fi
done
echo
- --
mfg,
pab
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFDN/h1r3NMWliFcXcRAkTiAKCOUpoliL4H7KU4PSnb1ed57604GwCgsw5n
hBeBNPaVBA2b/PEwFFUfFw0=
=wbqc
-----END PGP SIGNATURE-----
_______________________________________________________
Linux Mailing List - http://www.unixtech.be
Subscribe/Unsubscribe: http://www.unixtech.be/mailman/listinfo/linux
Archives: http://www.mail-archive.com/[email protected]
IRC: chat.unixtech.be:6667 - #unixtech
NNTP: news.gname.org - gmane.org.user-groups.linux.unixtech