Re: ASCII file to UTF-8 file converter
On Tue, Mar 26, 2002 at 06:58:58AM -0800, Pedro Ferreira wrote: Please, what is the best tool to convert an ascii file with unicode character codes like this: U+3400 U+3405 to another UTF-8 file with the corresponding unicode characters? Many thanks! Pedro Ferreira Perl, of course! Try something like this: perl -pe 's/U\+([0-9A-Fa-f]{4})/pack U, hex $1/ge' No wonder they call it the UNIX swiss army chainsaw... -- 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/
Re: ASCII file to UTF-8 file converter
Works fine, thank you! --- Oyvind A. Holm [EMAIL PROTECTED] wrote: On 2002-03-26 06:58-0800 Pedro Ferreira wrote: Please, what is the best tool to convert an ascii file with unicode character codes like this: U+3400 U+3405 to another UTF-8 file with the corresponding unicode characters? This Perl script should do the job: == CUT HERE == #!/usr/bin/perl -w __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ -- Linux-UTF8: i18n of Linux on all levels Archive: http://mail.nl.linux.org/linux-utf8/