linux - Convert charset from a entire project to utf-8 -


hi have project made in windows uses windows 1252 charset , need convert .php file utf-8 charset because database utf-8 encoded. there way using linux commands or software?

in project's root directory, use find(1) list *.php files , combine recode(1) convert files in place:

find . -type f -name '*.php' -exec recode windows1252..utf8 \{} \; 

as alternative recode(1), use iconv(1) conversion (for usage above find command: iconv -f windows-1252 -t utf-8 -o \{} \{}).

you need have either recode or iconv installed above work. both should installable via package manager on modern systems.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -