如何设置AEM/Sling中的默认字符编码?
How to set the default character encoding in AEM/Sling?
我正在尝试将 AEM/Sling 使用的字符编码设置为 UTF-8。根据 Sling documentation,这可以被 Sling Main Servlet 上的 属性 覆盖:
As of Sling Engine 2.2.4 the _charset_
request parameter is optional.
As of this version the Sling Main Servlet supports a configuration
setting which allows to change the default character encoding used if
the _charset_
request parameter is missing.
To enable this functionality set the sling.default.parameter.encoding
parameter of the Sling Main Servlet (PID org.apache.sling.engine.impl.SlingMainServlet
) configuration to the
desired encoding, which of course must be supported by the actual Java
Platform.
虽然这在以前的版本中是可行的,但此配置似乎已从最新版本的 AEM (6.0+) 和 Sling (8) 中删除,即在
的菜单中
sling.default.parameter.encoding
不存在了。现在是否有另一种方法来配置此值,使用 UTF-8 而不是 ISO 默认值?
在 AEM 6.0
上移至 Apache Sling 请求参数处理
我正在尝试将 AEM/Sling 使用的字符编码设置为 UTF-8。根据 Sling documentation,这可以被 Sling Main Servlet 上的 属性 覆盖:
As of Sling Engine 2.2.4 the
_charset_
request parameter is optional. As of this version the Sling Main Servlet supports a configuration setting which allows to change the default character encoding used if the_charset_
request parameter is missing.To enable this functionality set the
sling.default.parameter.encoding
parameter of the Sling Main Servlet (PIDorg.apache.sling.engine.impl.SlingMainServlet
) configuration to the desired encoding, which of course must be supported by the actual Java Platform.
虽然这在以前的版本中是可行的,但此配置似乎已从最新版本的 AEM (6.0+) 和 Sling (8) 中删除,即在
的菜单中sling.default.parameter.encoding
不存在了。现在是否有另一种方法来配置此值,使用 UTF-8 而不是 ISO 默认值?
在 AEM 6.0
上移至 Apache Sling 请求参数处理