On Fri, Apr 12, 2002 at 11:11:41AM -0400, [EMAIL PROTECTED] wrote:
> On Fri, 12 Apr 2002, Vasilis Vasaitis wrote:
>
> > Just like in the case of the opposite conversion, this conversion can also
> > be easily achieved with an one-liner. The following seems to be able to do
> > the job:
> >
> > perl -ne 'for (unpack "U*", $_) { printf $_ > 255 ? "U+%04X" : "%c", $_ }'
>
> Unless you regard ISO-8859-1 as a synonym to US-ASCII, '255' has to
> be '127' :-)
Er, right. That's what I meant, actually, but I guess I wasn't thinking
much at that moment :^). And since I only tested this with an iconv'ed
ISO-8859-7 text to UTF-8, I didn't even notice...
Cheers,
--
Vasilis Vasaitis
[EMAIL PROTECTED]
"Don't do drugs. Santa Claus is watching."
-- winamp.com
--
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/