How can I view and set the weblogic encoding format ?, Weblogic encoding format
I have little access to weblogic. Today, my colleague encountered a Chinese Garbled text problem. It is good to run the program in the windows environment of the local computer, but it is garbled on weblogic on linux. I suspect it is a linux system encoding problem, view/etc/sysconfig/i18n. The content is as follows:
[Html] view plain copy
LANG = "zh_CN.UTF-8"
SUPPORTED = "zh_CN.UTF-8: zh_CN: zh"
SYSFONT = "latarcyrheb-sun16"
Obviously, the encoding of the operating system is okay. The problem must be caused by weblogic. First, check the weblogic encoding as follows:
[Html] view plain copy
Search for file. encoding in AdminServer. log under the severs/AdminServer/logs directory. The file encoding used at startup is displayed.
We can see the GB2312 that weblogic uses. You need to modify the weblogic encoding format as follows:
[Html] view plain copy
Add in startWeblogic. sh
$ {JAVA_HOME}/bin/java $ {JAVA_VM }$ {MEM_ARGS }$ {JAVA_OPTIONS}-Dweblogic. Name =$ {SERVER_NAME}
-Dweblogic. webservice. i18n. charset = UTF-8 Djava. security. policy =$ {WL_HOME}/server/lib/weblogic. policy
$ {PROXY_SETTINGS} {SERVER_CLASS}
After modification, restart the weblogic service.
In addition, to modify the encoding format of the operating system, add the following in. bash_profile:
[Html] view plain copy
Export LC_ALL = "zh_CN.UTF-8"
Export LANG = "zh_CN.UTF-8"
Or modify the/etc/sysconfig/i18n file. The content is as follows:
[Html] view plain copy
LANG = "zh_CN.UTF-8"
SUPPORTED = "zh_CN.UTF-8: zh_CN: zh"
SYSFONT = "latarcyrheb-sun16"
The following information is displayed using locale:
[Html] view plain copy
LANG = "zh_CN.UTF-8"
SUPPORTED = "zh_CN.UTF-8: zh_CN: zh"
SYSFONT = "latarcyrheb-sun16"
[Root @ asiainfo1 ~] # Locale
LANG = zh_CN.UTF-8
LC_CTYPE = "zh_CN.UTF-8"
LC_NUMERIC = "zh_CN.UTF-8"
LC_TIME = "zh_CN.UTF-8"
LC_COLLATE = "zh_CN.UTF-8"
LC_MONETARY = "zh_CN.UTF-8"
LC_MESSAGES = "zh_CN.UTF-8"
LC_PAPER = "zh_CN.UTF-8"
LC_NAME = "zh_CN.UTF-8"
LC_ADDRESS = "zh_CN.UTF-8"
LC_TELEPHONE = "zh_CN.UTF-8"
LC_MEASUREMENT = "zh_CN.UTF-8"
LC_IDENTIFICATION = "zh_CN.UTF-8"
Lc_all= zh_CN.UTF-8