How can I view and set the weblogic encoding format ?, Weblogic encoding format

Source: Internet
Author: User
Tags i18n

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.