Nginx-Can 'tconvertstringfromutf8tonativeencoding

Source: Internet
Author: User
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;

}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.