ultranerds has asked for the wisdom of the Perl Monks concerning the following question:
This "seems" to work... but for some reason when I open this new file in NotePad++, it doesn't seem to recognise the encoding type (it also comes up weird in the DB, i.e "Vols + transferts + hébergement en formule "tout ...")system("iconv --from-code UTF-8 --to-code iso-8859-15 -c /var/home/sit +e/siteforum.com/www/admin/Plugins/Forum/Advertiser/Import/tmp/allVaca +tions.xml > /var/home/site/siteforum.com/www/admin/Plugins/Forum/Adve +rtiser/Import/tmp/allVacations.xml.new"); print qq|Done converting... \n|; system("perl -p -i -e 's|UTF-8|ISO-8859-15|g' *.new"); system("rm /var/home/site/siteforum.com/www/admin/Plugins/Forum/Ad +vertiser/Import/tmp/allVacations.xml"); print qq|Removed allVacations.xml... \n|; system("mv /var/home/site/siteforum.com/www/admin/Plugins/Forum/Ad +vertiser/Import/tmp/allVacations.xml.new /var/home/site/siteforum.com +/www/admin/Plugins/Forum/Advertiser/Import/tmp/allVacations.xml"); print qq|Moved file ... \n|; system("rm -f /var/home/site/siteforum.com/www/admin/Plugins/Forum +/Advertiser/Import/tmp/allVacations.xml.new"); print qq|Removed .new file... \n|;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: utf file to ansi, but doesn't work?
by moritz (Cardinal) on Feb 28, 2011 at 11:06 UTC | |
by ultranerds (Hermit) on Feb 28, 2011 at 12:00 UTC | |
by moritz (Cardinal) on Feb 28, 2011 at 12:32 UTC | |
by ultranerds (Hermit) on Feb 28, 2011 at 13:27 UTC | |
by eff_i_g (Curate) on Feb 28, 2011 at 15:24 UTC | |
by ikegami (Patriarch) on Feb 28, 2011 at 16:49 UTC | |
by eff_i_g (Curate) on Feb 28, 2011 at 17:44 UTC | |
| |
by fullermd (Vicar) on Mar 01, 2011 at 08:53 UTC | |
|
Re: utf file to ansi, but doesn't work?
by ikegami (Patriarch) on Feb 28, 2011 at 16:54 UTC |