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

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -