AEM / CQ5请求参数不是UTF-8 [英] AEM/CQ5 Request Parameter not UTF-8
问题描述
AEM 6.0 SP1和搜索组件存在一个小问题。如果搜索像Français
这样的法语单词,ç
就会弄乱
Have a slight issue with AEM 6.0 SP1 and the search component. If searching for a french word like "Français"
the "ç"
gets messed up
查询字符串类似于JSP端的?q =Français
, request.getCharacterEncoding()
根据需要返回 ISO-8859-1 而不是 UTF-8 。
the query string is like ?q=Français
on the JSP side, request.getCharacterEncoding()
returns ISO-8859-1 instead of UTF-8 like we need.
我知道在tomcat下时,您可以在连接器级别更改 URIEncoding
。
I know that when under tomcat you can change the URIEncoding
at the connector level.
但是对于直接运行的AEM / CQ实例,没有这样的事情。
有人知道了吗?
But for an AEM/CQ instance running directly by itself, there is no such thing. Anyone figured this out?
推荐答案
对于5.6.1 :默认编码可以可以在 Apache Sling Main Servlet 的配置中进行设置。在配置管理器
(< domain>:< port> / system / console / configMgr)中,查找Apache Sling Main Servlet并配置默认参数编码属性。
For 5.6.1 : The default encoding can be set in the configuration of Apache Sling Main Servlet . In the Configuration Manager (<domain>:<port>/system/console/configMgr) look for Apache Sling Main Servlet and configure Default Parameter Encoding property.
对于6.0 (信用- Francois Cournoyer ):该配置具有已移至 Apache Sling请求参数处理
For 6.0 (credits - Francois Cournoyer) : The configuration has been moved to Apache Sling Request Parameter Handling
配置临时文件位置,以在出现以下情况时指向绝对路径保存配置时出错
Configure Temporary File Location to point to an absolute path in case of errors while saving the configuration
这篇关于AEM / CQ5请求参数不是UTF-8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!