Jean-Jacques Clar a dit :
> Which encoding should be used for the .fr files?
> I started using UTF-8 (which is cool because I could type directly special
> characters like é, ë, ç), but the source document I am reviewing is also
> iso-8859-1.
>
> Thanks,
> JJ
>
>
>
I have built a dirty shell script I run on XML files.
This way, I type in the text with accents into the XML file,
then have them converted to valid 8859-1 using the script.
Script is attached, and script is pretty ugly, but works for me :-).
Just in case it helps..
Vincent
#!/bin/sh
ARG1=$1
WHO=`whoami`
ARG2=/tmp/tempaccentsfile.$WHO
ARG3=$ARG1.tmp
[ -f $ARG1 ] || exit #Input file
[ -f $ARG2 ] && exit #temporary file
[ -f $ARG3 ] && exit #output file
sed -e 's/à/\à/g' $ARG1 > $ARG2
sed -e 's/â/\â/g' $ARG2 > $ARG3
mv $ARG3 $ARG2
sed -e 's/é/\é/g' $ARG2 > $ARG3
mv $ARG3 $ARG2
sed -e 's/è/\è/g' $ARG2 > $ARG3
mv $ARG3 $ARG2
sed -e 's/ê/\ê/g' $ARG2 > $ARG3
mv $ARG3 $ARG2
sed -e 's/ô/\ô/g' $ARG2 > $ARG3
mv $ARG3 $ARG2
sed -e 's/ù/\ù/g' $ARG2 > $ARG3
mv $ARG3 $ARG2
sed -e 's/û/\û/g' $ARG2 > $ARG3
mv $ARG3 $ARG2
sed -e 's/ç/\ç/g' $ARG2 > $ARG3
mv $ARG3 $ARG2
sed -e 's/©/\©/g' $ARG2 > $ARG3
mv $ARG3 $ARG2
sed -e 's/î/\î/g' $ARG2 > $ARG3
mv $ARG3 $ARG2
sed -e 's/É/\É/g' $ARG2 > $ARG3
mv $ARG3 $ARG2
sed -e 's/È/\È/g' $ARG2 > $ARG3
mv $ARG3 $ARG2
sed -e 's/®/\®/g' $ARG2 > $ARG3
rm $ARG2
mv $ARG3 $ARG1
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]