Svn: Can & #39; tconvertstringfrom & #39; UTF8 & #39; tonativeencoding encountered a problem when using nginx in centos. I wrote an index in the web Directory configured by nginx. php file, content: test. sh content: cdtmprm-rf * svncosvn_path -- usernameusername -- passwordpasswd. then access the configured domain name in the browser. the above problem will occur if there is a Chinese name in the svn repository, but the nginx backend svnwebphp
Svn: Can't convert string from 'utf8' to native encoding
I encountered a problem when using nginx in centos. I wrote
Index. php file, content:
Exec ("./test. sh", $ out, $ res );
Print_r ($ out );
?>
Test. sh content:
cd tmp rm -rf * svn co svn_path --username username --password passwd .
Then access the configured domain name in the browser. if there is a Chinese name in the svn repository, the above problem will occur, but it is okay to directly use the svn command in centos. execute php index in the terminal. php is no problem, in the terminal to execute curl URL will be out of the above problem, so the basic can certainly be nginx configuration problem, the online said the setting system encoding for en_US.utf-8 and zh_CN.utf-8 and gb2312, gbk methods have been tried. in nginx, charset is configured as gbk, gb2312, and UTF-8, for nginx configuration problems, I hope to provide a configuration for parsing the nginx php page as follows:
Location ~. Php $ {
include fcgi.conf;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;expires off;
}