[Cppcms-users] Apache utf8 headers
Brought to you by:
artyom-beilis
From: augustin <aug...@ov...> - 2012-07-02 06:07:07
|
Hello, I have 2 exactly identical web sites (same code, same html output), but one is set up to be started by the web server, and the other is set up to be started manually. See: http://cppcms.com/wikipp/en/page/cppcms_1x_tut_web_server_config#Apache In config.js, I have in both cases: "localization" : { "encoding" : "UTF-8", }, The html output contains in both cases: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> However, the apache headers are not the same. In the case of the manually started web site, the headers correctly specify: Content-Type text/html; charset=utf-8 while with the site started by the web server, the header specifies: Content-Type text/html; charset=us-ascii and thus I have to manually set my browser to display the web page in utf8 encoding to properly view the page. How come the apache Content-Type charset header is not the same? How to ensure the charset is the correct one? Also, where is the most appropriate place to rectify this? Should I set this in .htaccess? Should it be corrected from within the cppcms application, by declaring the proper http header? Should it be fixed in the apache settings for the web site (/etc/apache2/sites- available/mysite)? Maybe I should use this: http://cppcms.com/cppcms_ref/latest/classcppcms_1_1http_1_1response.html but I am confused by the discrepancy between the two sites, given that they have the same code and the same settings. Can this be considered as a small bug in cppcms? Thanks, Augustin. -- Friends: http://www.reuniting.info/ My projects: http://astralcity.org/ http://lesenjeux.fr/ http://linux.overshoot.tv/ http://overshoot.tv/ http://charityware.info/ http://masquilier.org/ http://openteacher.info/ http://minguo.info/ http://jacqueslemaire.fr/ http://www.wechange.org/ http://searching911.info/ . |