Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #enter input encoding here
- FROM_ENCODING="ISO-8859-1"
- #output encoding(UTF-8)
- TO_ENCODING="UTF-8"
- #convert
- CONVERT=" iconv -f $FROM_ENCODING -t $TO_ENCODING"
- #loop to convert multiple files
- for file in *.php; do
- $CONVERT "$file" > "${file%.php}.utf8.converted"
- done
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement