Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.30 KB | None | 0 0
  1. #!/bin/bash
  2. #enter input encoding here
  3. FROM_ENCODING="ISO-8859-1"
  4. #output encoding(UTF-8)
  5. TO_ENCODING="UTF-8"
  6. #convert
  7. CONVERT=" iconv  -f   $FROM_ENCODING  -t   $TO_ENCODING"
  8. #loop to convert multiple files
  9. for  file  in  *.php; do
  10. $CONVERT   "$file" > "${file%.php}.utf8.converted"
  11. done
  12. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement