bea.com | products | dev2dev | support | askBEA
 Download Docs   Site Map   Glossary 
Search

Notes on Using the Japanese Language Version

 Previous Next Contents View as PDF  

Notes on Using the Japanese Language Version

Before you install and use WebLogic Portal Release 7.0, read the following topics in this document:

 


Restrictions on Using Double-byte Characters

Use of the double-byte characters (and the single-byte Katakana characters) in the following items is prohibited under WebLogic Portal Release 7.0J (WLP7.0J):

E-Business Control Center (EBCC)

In addition, the use of double-byte characters is prohibited in the following names whenever the system's default encoding differs from that of the portal application:

EBCC

Administration Tools

Note: Shift_JIS is the default encoding for the portal applications created with WLP7.0J. The system's default encoding can be changed to match that of the portal application as described in the Changing the Default Encoding of a New Domain section immediately below.

 


Changing the Default Encoding of a New Domain

  1. Change the default encoding of the portal applications:

    The portal application files, created in the user domain using Domain Wizard and Portal/Portlet Wizard, are encoded with Shift_JIS. The default encoding of the created files can be changed in the following manner:

    Replace the encoding specification of the following files under \weblogic700\common\templates\webapps\portal\baseportal\j2ee (including its subdirectories) with an appropriate Java encoding value (EUC-JP, etc.):

    framework\floated_portlet.jsp(20): String charset = "Shift_JIS";
    framework\portal.jsp(11): String charset = "Shift_JIS";
    framework\security\help.jsp(5): String charset = "Shift_JIS";
    framework\security\login_header.inc(7): String charset = "Shift_JIS";
    framework\security\need_group.jsp(10): String charset = "Shift_JIS";
    framework\security\new_user.jsp(6): String charset = "Shift_JIS";
    framework\security\set_password.jsp(6): String charset = "Shift_JIS";
    framework\tools\i18n_setup.inc(7): String charset = "Shift_JIS";
    WEB-INF\weblogic.xml.stock(107): <param-value>Shift_JIS</param-value>
    WEB-INF\weblogic.xml.stock(118): <java-charset-name>Shift_JIS</java-charset-name>

    Specify the IANA character set name for the following files:

    framework\security\meta.inc(1): <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">

  2. Change the encoding of the Portal Management tools:

    The restriction on the use of the double-byte characters in the application data names and group portal names can be eliminated by matching between the system's default encoding and that of the application in the following manner:

    1. Change the third line of weblogic700\common\templates\domains\shared\bea\portal\ webapps\tools\tools\portal\i18n_setup.inc to an appropriate Java encoding:
      String charset = "Shift_JIS";

    2. Change lines 133 and 144 of weblogic700\common\templates\domains\shared\ bea\portal\webapps\tools\WEB-INF\weblogic.xml to an appropriate Java encoding:
      <param-value>Shift_JIS</param-value>
      <java-charset-name>Shift_JIS</java-charset-name>

    Note: These changes must be made before creating a new domain using Domain Wizard.

  3. Change the encoding of the management tools other than the Portal Management tools:

    When the use of the double-byte characters is needed with non-portal management tools (e.g. User, Catalog, or Order Management) after making the changes per step 2 above, the content of the JSP file of these management tools must be re-saved in the system's default encoding. In addition, the encoding value in the page directive specified within the JSP file must be changed accordingly at the same time.

 


Commerce Templates in the Japanese Language Version

The commerce templates in the Japanese language version are based on the English version but have been modified to suit Japanese practices. The following changes must be taken into consideration when using the commerce templates in the Japanese language version:

Consumption tax

WLP7.0J uses Web services to calculate the consumption taxes in the commerce templates and E2E samples.

Customer information

The sample data contains the following information in the respective columns of the customer information table (WLCS_CUSTOMER), the shipping address table (WLCS_SHIPPING_ADDRESS) and the credit card information table (WLCS_CREDIT_CARD):

FIRST_NAME (WLCS_CUSTOMER only): Customer's name (Katakana)

LAST_NAME (WLCS_CUSTOMER only): Customer's name (Kanji)

XXX_STREET1: Street numbers

XXX_STREET2: Apartment (building) name

XXX_CITY: City, ward, town, village, etc.

XXX_STATE: Prefecture

Memo: "XXX" represents "MAILING" (WLCS_CUSTOMER), "SHIPPING" (WLCS_SHIPPING_ADDRESS) and BILLING (WLCS_CREDIT_CARD) respectively.

Decimal fractions made hidden

The following changes have been made to hide decimal fractions in the commodity prices, total amounts, etc.

The japanesePriceFormat() method is used instead since the priceFormat() method in the WebflowJSPHelper class used in the JSP file cannot hide the decimal fractions.

In addition, the following changes have been made on some files (shoppingcart.jsp, checkout.jsp, confirmorder.jsp, orderstatus.jsp) to display discount prices.

Before change: PriceFormat.setMinimumFractionDigits(2)

After change: PriceFormat.setMinimumFractionDigits(0)

Changes to InputProcessor classes

A number of changes have been made, with regard to the following InputProcessors in the Japanese language version (as shown below), after which the prefecture and a few other entries are required, the "Middle Name" is deleted, etc.

Refer to the InputProcessor source codes under wlcsApp\wlcs\WEB-INF\src.

Affected files in the Japanese language version:

CustomerProfileIP.java

UpdataBasicInfoIP.java

UpdatePaymentInfoIP.java

UpdateShippingInfoIP.java

ValidateAddressIP.java

Order status

The order status (e.g. Submitted, Authorized) displayed in the commerce templates (orderstatus.jsp) can be changed into Japanese language by editing orderstatus.xml (in ebusiness.jar).

Note: UTF-8 will be the default encoding as no encoding is specified in the XML file. Select UTF-8 when editing or saving the file.

Error messages in Japanese language

The error messages displayed in the commerce templates are stored in lib\commerce_system.jar.

Amend the wording, etc., as needed and re-create the jar file in the following manner:

  1. Extract the commerce_system.jar file.

  2. Edit and save wlcs-catalog_sjis.properties.

  3. Enter the following command: native2ascii wlcs-catalog_sjis.properties wlcs-catalog_ja.properties

  4. Re-create the commerce_system.jar file.

E-mails for campaigns

We strongly recommend that you use JSP files encoded with ISO-2022-JP in e-mails for campaigns.

The JSP files encoded with Shift_JIS can be converted into ISO-2022-JP using a JDK tool named native2ascii.exe.

Examples:

> native2ascii Sample1_sjis.txt Sample1_unicode.txt
> native2ascii -reverse Sample1_unicode.jsp Sample1.jsp 

The JSP file requires a page directive (shown below) at the beginning of the file.

<%@ page contentType="text/html; charset=iso-2022-jp" %>

Other changes

A page tag (shown below) is added to all pages in the Japanese language version.

<%@ page contentType="text/html; charset=Shift_JIS" %>

The prices (in Japanese currency) of the items in the sample data are random values substituting the sample data in the original US version. They are not realistic values based on exchange rates.

 


Additional Information for the Japanese Language Version about the Business Data Deployment

BulkLoader utilities

The BulkLoader program is invoked by user_projects/portalDomain/loaddocs.bat (.sh) and user_projects/portalDomain/loadads.bat (.sh), and various encoding options are available in this program. When loading a Japanese content, specify Shift_JIS, EUC-JP, ISO-2022-JP, or other encoding as necessary in the -encoding option. Note also that the properties of the metadata used in the BulkLoader program (e.g. dir.md.properties) must be handled as a standard Java-style properties file. The double-byte characters, therefore, must be converted into the Unicode escape characters using native2ascii.

DBLoader utilities

The DBLoader program is invoked by weblogic700/portal/db/load_data.cmd when executing user_projects/portalDomain/create_db.cmd (.sh), and various encoding options are available in this program. The encoding for the data to be loaded in the database (under weblogic700/portal/db/data) can be specified using User_projects/portalDomain/db_settings.properties. When loading data in the Japanese language, specify Shift_JIS, EUC-JP, ISO-2022-JP, or other Java encoding as necessary in the db_settings.properties according to the encoding of the data under db/data.

 


E-Business Control Center

Restrictions on using double-byte characters

See Restrictions on Using Double-byte Characters above for details.

 


Sample portals

The sample portals use the I18N framework in the personalization server to retrieve and display text in Japanese from the properties files. It is possible to display Japanese text in place of English one by directly editing the JSP file.

 


Known problems

Note: The following problems only happen in the Japanese version.

Greeking occurs in some WLCS templates

Remedy:

Add the following line to category.jsp:

<%@ page contentType="text/html; charset=Shift_JIS" %>

Exception occurs when browsing Technical Details section of the b2cPortal in the e2e Sample

Remedy:

Change the key in the first line of td-added-from-saved_ja.properties file, as shown below, and reboot the server.

step1.jsp -> step1

Part of the sourcecode is "greeked" when ViewSource is clicked in the P13N Sample (in EUC-JP environments only)

Remedy:

Change lines 21 through 33 of \weblogic700\samples\portal\p13nDomain\beaApps\p13nApp\p13n\source_view.jsp as shown below.

<Before applying remedy>

<%
InputStream is = pageContext.getServletContext().getResourceAsStream("/" + includeFile);
int l = is.available();
byte[] buf = new byte[l];
int i = is.read(buf);
%>
<pre>
<es:convertSpecialChars string="<%=new String(buf)%>" />
</pre>

<After applying remedy>

<%
InputStream is = pageContext.getServletContext().getResourceAsStream("/" + includeFile);

int l = is.available();
byte[] buf = new byte[l];
int i = is.read(buf);
String encoding = new String("Shift_JIS");
%>
<pre>
<es:convertSpecialChars string="<%=new String(buf,encoding)%>" />
</pre>

Text is "greeked" on the E-mail portlet of the SamplePortal

Remedy:

Add the following code to the third line of \weblogic700\samples\portal\sampleportalDomain\beaApps\sampleportal\sampleportal\campaigns\emails\welcome.jsp.

<%
String lang = "ja";
String charset = "iso-2022-jp";
%>
<i18n:localize language="<%=lang%>" charset="<%=charset%>"/>

 

Back to Top Previous Next