How to get UTF-8 characters in JBoss 7?

Im using JBoss 7.1.3. Currently, when I send a request to the server with a special character like

Café

it is accepted by the server as

Café

The only advice I found on the Internet for a fix was to add these sysmte properties to $ JBOSS_HOME / standalone / configuration / standalone.xml ...

<system-properties>
    <property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/>
    <property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/>
</system-properties>

However, even after rebooting my server, my special characters still get wrong on the server side. What else can I do to correctly interpret the characters?

+4
source share
4 answers

, JBOSS 7.1.0 beta , , standalone.conf bin

JAVA_OPTS="$JAVA_OPTS -Dorg.apache.catalina.connector.URI_ENCODING=UTF-8"

standalone.conf bin domain.conf ,

-Dfile.encoding=UTF-8

* 7.1 JBOSS

0

e-sharp - U + 00E9. UTF-8, 0xC3 0xA9. , - cp1252 , Ã ©. : . jboss UTF-8.

0

?

,

-Dorg.wildfly.undertow.ALLOW_UNESCAPED_CHARACTERS_IN_URL=true

https://issues.jboss.org/browse/JBEAP-13710

0

org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING false.

, Jboss EAP 6.4.0.

, , URI_ENCODING, USE_BODY_ENCODING_FOR_QUERY_STRING true ( ), ISO-8859-1.

tomcat: https://tomcat.apache.org/tomcat-8.5-doc/config/http.html ( useBodyEncodingForURI useBodyEncodingForURI).

0

Source: https://habr.com/ru/post/1662581/


All Articles