-
-
Save markxp/c654b79d9152ac83b0a486b4cce00514 to your computer and use it in GitHub Desktop.
Revisions
-
akost created this gist
Apr 4, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #!/bin/bash # Recursive file convertion windows-1251 --> utf-8 # Place this file in the root of your site, add execute permission and run # Converts *.php, *.html, *.css, *.js files. # To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -type f | while read file do echo " $file" mv $file $file.icv iconv -f WINDOWS-1251 -t UTF-8 $file.icv > $file rm -f $file.icv done