Re: Output of dpkg-scanpackages as XML
On Wed, Jan 05, 2005 at 10:36:53PM +0000, David Given wrote:
> iconv is your friend:
>
> zcat Packages.gz | iconv -f utf8 -t ucs2-le | cscript
In our case we're using sed. Is sed unicode-aware?
(As an aside a lot of the commands you use in NT are builtins to cmd.exe
and under this switch they all accept unicode and output unicode instead
of ascii. cscript.exe either does it automatically or there's a switch,
can't remember. The MSVC CRT and the Win32 API have wide and narrow
APIs for standard i/o).
But back to Linux.
$echo hi | iconv -f utf8 -t unicode | grep hi
(no output)
Does bash support unicode of some kind? Something like:
$echo hi | iconv -f utf8 -t unicode | grep L"hi"
^^^
to borrow a C++ syntax? And what happens to the standard utils?
Reply to: