This is the mail archive of the
mailing list for the Cygwin project.
Re: file conversion utility sought: from isolatin (8859-1) to utf8
- From: Robert Schmidt <rschm at broadpark dot no>
- To: cygwin at cygwin dot com
- Date: Tue, 28 Sep 2004 12:57:49 +0200
- Subject: Re: file conversion utility sought: from isolatin (8859-1) to utf8
- References: <E1CCF31-0005vJfirstname.lastname@example.org>
Ralf Hauser wrote:
Are there any tools like d2u or u2d for UTF-8 for cygwin?
A starting point might be
Not particularly cygwin related, but anyway...
This is a better start:
print encode("utf8", decode("iso-8859-1", $_));
mkdir -p utf8
for FILE in $* ; do iso2utf8.pl < $FILE > utf8/$FILE ; done
If you're sure you want in-place, finish off with
mv utf8/* .
If you need to handle a hierarchy of files, you need to fiddle with find
-print0 | xargs -0, or keep it all in perl. I'm not a perl wiz,
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html