Re: [Cppcms-users] Apache utf8 headers
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2012-07-02 06:30:50
|
The encoding option is not in use for a LOOOONG time http://cppcms.com/wikipp/en/page/cppcms_1x_config#localization CppCMS automatically sets the Content-Type charset according to the process locale, if apache starts the web server using C locale than by default you'll get us-ascii charset. The correct solution is to define the locale for the cppcms service "localization" { "locales" : [ "en_US.UTF-8" ] } Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: augustin <aug...@ov...> >To: cpp...@li... >Sent: Monday, July 2, 2012 9:15 AM >Subject: Re: [Cppcms-users] Apache utf8 headers > >On Monday, July 02, 2012 02:06:45 PM augustin wrote: >> 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? > >I fixed this by adding the following in my application: > response().content_type("text/html; charset=UTF-8"); >but maybe this is not the most appropriate way to handle this, or cppcms could >have guessed the proper encoding from config.js. > >And if this is the proper solution, hopefully by putting it here, it will help >someone else. > > > >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/ > > > > > > > > > > > > >. > >------------------------------------------------------------------------------ >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |