Menu

Close
  • Home
  • Solutions Log
  • About
  • Search
Subscribe
☰Menu

Convert text file to UTF-8 encoding from the shell

for f in *.txt; do iconv -f mac -t utf-8 “$f” >“$f.utf8”; done

Note: -f Input file encoding type -t Output file encoding type

Reference: http://manual.macromates.com/en/saving_files.html

Dan Reiland

Operations Engineer

Minneapolis, Minnesota https://unixsherpa.com

Share this solution

Twitter Facebook Pinterest Google+
UnixSherpa All rights reserved - 2023