How to change an entire website's files' character encoding to UTF-8?
问题 How can I change all of my php/css/js files to utf character encoding? I can't get it to validate otherwise. 回答1: Have you tried the .htaccess option "AddCharset". It should work on the parent directory of where the .htaccess file is located plus all sub directories. AddCharset UTF-8 .php http://www.w3.org/International/questions/qa-htaccess-charset 回答2: You haven't said what encoding the files are in at the moment, or what operating system you are using. On my Ubuntu system, I have a command