Convert file encoding recursively


/ Published in: Bash
Save to your folder(s)

iconv -l to show all available encodes, replace xxx with you file ext


Copy this code and paste it in your HTML
  1. #!/bin/bash
  2.  
  3. find /Path/To/Files -name \*.xxx -type f | \
  4. (while read file; do
  5. iconv -f ISO-8859-1 -t UTF8 "$file" > "${file%.xxx}-utf8.xxx";
  6. done);

URL: http://stackoverflow.com/questions/1182037/osx-change-file-encoding-iconv-recursive

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.