![]() ![]() ![]() ![]() |
This document contains the following:
The following Eclipse and Plug-in products are bundled with BEA Workshop 10.2.
The following language packs, the latest versions at the time of release, for Eclipse and Plug-in products for the above modules are bundled with BEA Workshop 10.2 language pack.
When an Enterprise Application Project is created, UTF-8 is set by default in weblogic-application.xml as shown below.
<application-param>
<param-name>webapp.encoding.default</param-name>
<param-value>UTF-8</param-value>
</application-param>
Encoding is not set in web.xml or weblogic.xml when a Web Project is created. This is to prevent the automatic setting at the Web Project level from overwriting the settings at the Enterprise Application Project level. If you want to make settings at the Web Project level, you have to edit those files in Workshop as shown in the following examples. For the setting procedure or the effect range of settings, see Use with Multibyte Environments for WebLogic Server and WebLogic Server Documentation.
page-encoding element in web.xml:
<jsp-config>
<jsp-property-group>
<url-pattern>/euc/*</url-pattern>
<page-encoding>EUC-JP</page-encoding>
</jsp-property-group>
<jsp-property-group>
<url-pattern>/utf8/*</url-pattern>
<page-encoding>UTF-8</page-encoding>
</jsp-property-group>
</jsp-config>
input-charset element in weblogic.xml:
<charset-params>
<input-charset>
<resource-path>/*</resource-path>
<java-charset-name>EUC_JP</java-charset-name>
</input-charset>
<input-charset>
<resource-path>/rus/joe/*</resource-path>
<java-charset-name>Shift_JIS</java-charset-name>
</input-charset>
</charset-params>
When a file is created in Workshop, the following encoding is used by default.
File type
| Description
|
---|---|
JSP files
(NetUI/JSF) |
Default encoding: UTF-8
Change of the default encoding: Not allowed
You have to change the encoding for each file after it is created.
|
JSP files
(Other than mentioned above) |
Default encoding: Java VM encoding
Change of the default encoding: Allowed
The encoding can be changed by selecting Window > Preferences > Web and XML > JSP Files (Creating Files). The VM encoding may not be set properly for some Linux locales such as ja_JP.eucjp. If this is the case, change the encoding manually by selecting Window > Preferences > Web and XML >JSP Files (Creating Files) after creating a Workspace.
|
XML files
|
Default encoding: UTF-8
Change of the default encoding: Allowed
The encoding can be changed by selecting Window > Preferences > Web and XML > XML Files (Creating Files).
Encoding for automatic creation: UTF-8
You cannot change the encoding with internal files created automatically or cannot modify the files.
|
HTML files
|
Default encoding: Java VM encoding
In WebLogic Workshop 8.1, the default encoding was UTF-8. But from Workshop 9.2, it has been changed to Java VM encoding because of employing the Web Tool Platform Creation Wizard.
Change of the default encoding: Allowed
The encoding can be changed by selecting Window > Preferences > Web and XML > HTML Files (Creating Files).
The VM encoding may not be set properly for some Linux locales such as ja_JP.eucjp. If this is the case, change the encoding manually by selecting Window > Preferences > Web and XML > HTML Files (Creating Files) after creating a Workspace.
|
CSS files
|
Default encoding: Java VM encoding
Change of the default encoding: Allowed
The encoding can be changed by selecting Window > Preferences > Web and XML > CSS Files (Creating Files).
The VM encoding may not be set properly for some Linux locales such as ja_JP.eucjp. If this is the case, change the encoding manually by selecting Window > Preferences > Web and XML > CSS Files (Creating Files) after creating a Workspace.
|
Java files
|
Default encoding: Java VM encoding
Change of the default encoding: Not allowed
In Workshop, the encoding for the java extension in Content Types of Eclipse cannot be changed from the VM encoding.
However, when ja_JP.eucjp Locale of Linux is used, after Workspace is created, it is necessary to set 'EUC-JP' as default encoding by using Window > Preferences > General > Content Types > Text > Java Source File.
Encoding for automatic creation: Java VM encoding
You cannot change the encoding with internal files created automatically or cannot modify the files.
|
JavaScript files
|
Default encoding: ISO-8859-1
Change of the default encoding: Allowed
The encoding can be changed by selecting Window > Preferences > General > Content Types > Text > JavaScript.
|
Note: Whenever multibyte characters are used in JavaScript files, the encoding setting must be changed.
When a file is saved or read in Workshop, the encoding is determined by the following settings. The setting at File > Properties > Info > Text file encoding in Eclipse can be defined for each file or folder. This setting has priority over the following settings in determining the encoding. However, this encoding specification is valid only in Workspace. The following table contains the encoding specifications (such as ContentTypes) that are valid only in Workspace. For successful execution of application, actual file encoding and the encoding adopted at the time of execution should match. It is recommended to specify encoding explicitly in the unit of each file or Web Project (In case of JSP) to retain the file portability.
Setting Location
|
Effective Area
|
Priority
|
Setting Example
|
---|---|---|---|
page-encoding element in web.xml
|
Each Web Project
|
1*1*2
|
<jsp-config> <jsp-property-group> <url-pattern>/euc/*</url-pattern> <page-encoding>EUC-JP</page-encoding> </jsp-property-group> <jsp-property-group> <url-pattern>/utf8/*</url-pattern> <page-encoding>UTF-8</page-encoding> </jsp-property-group> </jsp-config |
pageEncoding attribute of Page directive
|
Each file
|
1*1*2
|
<%@ page pageEncoding="Windows-31J" %>
|
contentType attribute of Page directive
|
Each file
|
2*2
|
<%@ page contentType="text/html; charset=EUC-JP" %>
|
Window > Preferences > General > Content Types > Text > JSP
|
Each Workspace
|
3
|
ISO-8859-1
|
*1 Due to JSP2.0 specification, if web.xml page-encoding element and pageEncoding attribute of page directive do not match, an error occurs at the time of translation. For this reason, if a value is set for the page-encoding element in web.xml, it must match the pageEncoding attribute of the page directive.
*2 If the file contains the charset attribute for Meta tag, it must match the encoding having priority.
Setting Location
|
Effective Area
|
Priority
|
Setting Example
|
---|---|---|---|
encoding attribute in the XML declaration
|
Each file
|
1*1
|
<?xml version="1.0" encoding="UTF-8"?>
|
*1 Since JSP Document is described in XML, how the encoding is specified for JSP Document file will be compliant to XML specification. This specification cannot be omitted in Workshop. Due to JSP2.0 specification, when in JSP Document any page-encoding elements of web.xml or any file encoding by pageEncoding attributes for page directive is set and if any of these is not compliant to encoding attributes of XML declaration of JSP Document, an error occurs at the time of translation.
Setting Location
|
Effective Area
|
Priority
|
Setting Example
|
---|---|---|---|
pageEncoding attribute of tag directive
|
Each file
|
1*1
|
<%@ tag pageEncoding="EUC-JP" %>
|
*1 This specification cannot be omitted in Workshop.
Setting Location
|
Effective Area
|
Priority
|
Setting Example
|
---|---|---|---|
encoding attribute in the XML declaration
|
Each file
|
1*1
|
<?xml version='1.0' encoding='UTF-8' ?>
|
Window > Preferences > General > Content Types > Text > JSP > JSP Tag Definition*2
|
Each Workspace
|
2
|
UTF-8
|
*1 Since XML format Tag files are described in XML, how the encoding is specified for XML format Tag files will be compliant to XML specification. Due to JSP2.0 specification, it is not allowed to specify the encoding for XML format Tag files with the pageEncoding attribute.
Setting Location
|
Effective Area
|
Priority
|
Setting Example
|
---|---|---|---|
charset attribute of content in the META tag
|
Each file
|
1
|
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
|
Window > Preferences > General > Content Types > Text > HTML*1
|
Each Workspace
|
2
|
ISO-2022-JP
|
Window > Preferences > Web and XML > HTML Files (Loading Files)*2
|
Each Workspace
|
3
|
EUC-JP
|
*1 UTF-8 cannot be set as the default value for extensions. If you want to use UTF-8, set it in the META tag.
*2 UTF-8 cannot be set as the default value for load files. If you want to use UTF-8, set it in the META tag.
Setting Location
|
Effective Area
|
Priority
|
Setting Example
|
---|---|---|---|
encoding attribute in the XML declaration
|
Each file
|
1
|
<?xml version='1.0' encoding='utf-8' ?>
|
Window > Preferences > General > Content Types > Text > XML
|
Each Workspace
|
2
|
UTF-8
|
Setting Location
|
Effective Area
|
Priority
|
Setting Example
|
---|---|---|---|
@CHARSET attribute
|
Each file
|
1*1
|
@CHARSET “EUC-JP”;
|
*1 This specification cannot be omitted in current version of Eclipse.
![]() ![]() ![]() |