0

I am using WildFly9, but it seems support English encoding only! Browser content of Chinese characters: '我们', changes to '₩ネム¦ᄏᆲ' in server side!

I am looking for configuration help or even an undertow patch ! Can anyone help?Great thanks!

happyyangyuan
  • 179
  • 3
  • 14

1 Answers1

1

You should set Undertow default encoding to UTF-8 (or maybe just your deployment). Using the jboss-cli this should do the trick for the whole server:

/subsystem=undertow/servlet-container=default:write-attribute(name=default-encoding,value=UTF-8)

ehsavoie
  • 3,126
  • 1
  • 16
  • 14
  • What is the default encoding of your OS ? – ehsavoie Aug 10 '15 at 07:12
  • bogon:~ happyyangyuan$ locale LANG="zh_CN.UTF-8" LC_COLLATE="zh_CN.UTF-8" LC_CTYPE="zh_CN.UTF-8" LC_MESSAGES="zh_CN.UTF-8" LC_MONETARY="zh_CN.UTF-8" LC_NUMERIC="zh_CN.UTF-8" LC_TIME="zh_CN.UTF-8" LC_ALL= bogon:~ happyyangyuan$ – happyyangyuan Aug 11 '15 at 06:24