William Ballard wrote: [...]
Of course you're right. But building XML with shell commands was always a lot easier when I could count on all shell output being 2-byte Unicode. It was a neat bit of magic, ascii and utf-8 text files would get turned into Unicode and I'd pipe them to cscript.exe and my XML would never break.
iconv is your friend:
zcat Packages.gz | iconv -f utf8 -t ucs2-le | cscript
(Packages.gz is in UTF8, right? In fact, if you were using grep you'd want to use UTF8 so that the non-ASCII characters would simply fall through, rather than UCS2.)
Unicode and XML are like chocolate and peanut butter.
Um, yeah. Personally, I've never eaten peanut butter and chocolate together, and have no desire to. I think XML is overrated, too, but that's neither here nor there...
-- [insert interesting .sig here]
-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]