Hi, I am using sed from cygwin on Windows to do some substitutions in text files. Everything works fine for normal (ANSI) files, but it doesn't do anything for utf-16 files (no substitutions are made). Do you know how I can make it work for both types of files at the same time?
views:
1574answers:
1
+3
A:
I would wrap this with iconv, like
iconv -f utf-16 -t utf-8 <input | sed -e expr | iconv -f utf-8 -t utf-16 >output
Martin v. Löwis
2008-11-05 19:59:19