Foreign Characters in IDM

I ran into an issue a while back on getting Internationalization to work in IDM.  This particular instance was for Czech Characters which needs a custom message file.  One thing to note with this is for Internationalization to work you need to make sure your Database and Application server can handle it.  Meaning it needs to support UTF-8 .

Here is what I did:

1. I installed a fresh copy of IDM 6.0sp4 with Websphere 6.0 on Oracle 10



2 . I enabled Internationalization by:

1. Editing the waveset.properties file and turning on internationalization from false to true.


2. I copied the language files IDM_5_0_l10n_ja_JP.jar or what ever language you want to use  into idm-root/WEB-INF/lib directory. I did this just to make sure the default languages would work.

3. Edit the i18n.xml file to show the languages I want to set

            <Object name='cs_CZ'>
            <Attribute name='lang' value='cs'/>
            <Attribute name='cntry' value='CZ'/>
            <Attribute name='gif' value='images/f0-cs.gif'/>
            </Object>

I imported the i18n.xml file into IDM. This file is located in the samples directory



3. Next you need to create a custom message catalog for Czech characters. See previous post on how to do this.

In the custom Message catalog I add the line:

<Msg id='UI_PWD_LABEL'>á â ä č ď é ě ë í î ľ ň ó ö ô ř š ť ú ů ü ý ž</Msg>

click save and the line turns into

Msg id='UI_PWD_LABEL'>á â ä ¿ ¿ é ¿ ë í î ¿ ¿ ó ö ô ¿ ¿ ¿ ú ¿ ü ý ¿</Msg>

also IDM Login shows the same missing characters.

4.  I set the encoding for UTF-8 for JVM for WebSphere application server:

Below are the steps:
1. In the administrative console, click Servers > Application servers and select the server you want to enable for UCS Transformation Format.
2.  Then, under Server Infrastructure, click Java and Process Management > Process Definition > Java Virtual Machine.
3.  Specify -Dclient.encoding.override=UTF-8 for Generic JVM Arguments and click OK. When this argument is specified, UCS Transformation Format is used instead of the character encoding that would be used if the autoRequestEncoding option was in effect.
4. Click Save to save your changes.
5. Restart the application server.

I edit the line again to remove the ? above <Msg id='UI_PWD_LABEL'>á â ä č ď é ě ë í î ľ ň ó ö ô ř š ť ú ů ü ý ž</Msg>

click save and I see
<Msg id='UI_PWD_LABEL'>á â ä ¿ ¿ é ¿ ë í î ¿ ¿ ó ö ô ¿ ¿ ¿ ú ¿ ü ý ¿</Msg>

Nothing has changed.

5.  I will now edit Oracle database properties

I test the Oracle for the Czech characters. I get question marks. I check the database parameters. I see the
NLS_CHARACTERSET WE8ISO8859P1

This can be done by command line as well 

SQL> select \* from nls_database_parameters;

PARAMETER VALUE
------------------------------ ----------------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET WE8ISO8859P1
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM

PARAMETER VALUE
------------------------------ ----------------------------------------
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 10.2.0.1.0

20 rows selected

$ ./sqlplus /nolog

SQL\*Plus: Release 10.2.0.1.0 - Production on Wed Jun 20 16:54:56 2007

Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL> connect sys/password as sysdba
Connected.


SQL> shutdown immediate;

Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> STARTUP RESTRICT;
ORACLE instance started.

Total System Global Area 1593835520 bytes
Fixed Size 1978976 bytes
Variable Size 385879456 bytes
Database Buffers 1191182336 bytes
Redo Buffers 14794752 bytes
Database mounted.
Database opened.

SQL> alter database character set internal_use AL32UTF8;

Database altered.

SQL> shutdown;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup;
ORACLE instance started.

Total System Global Area 1593835520 bytes
Fixed Size 1978976 bytes
Variable Size 385879456 bytes
Database Buffers 1191182336 bytes
Redo Buffers 14794752 bytes
Database mounted.
Database opened.

I run the following :


SQL> select \* from nls_database_parameters;

PARAMETER VALUE
------------------------------ ----------------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET AL32UTF8
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM

PARAMETER VALUE
------------------------------ ----------------------------------------
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 10.2.0.1.0

20 rows selected

6. Run a Oracle test by doing the following

I logged to http://host:5560/isqlplus/workspace.uix

as waveset/waveset

then

update userobj set ATTR3='á â ä č ď é ě ë í î ľ ň ó ö ô ř š ť ú ů ü ý ž' where name='ADMINISTRATOR';
commit;

then

select \* from userobj where name='ADMINISTRATOR';

Oracle picks them up and I see



Now I will edit the customMessageCatalog again with

<Msg id='UI_PWD_LABEL'>á â ä č ď é ě ë í î ľ ň ó ö ô ř š ť ú ů ü ý ž</Msg>

I click save and I get the same line back
<Msg id='UI_PWD_LABEL'>á â ä č ď é ě ë í î ľ ň ó ö ô ř š ť ú ů ü ý ž</Msg>

I restart WebSphere

and I get all the characters showing up



Note: I didn't do anything to the OS or the java on the OS. I used the default java that came with WebSphere.

root@pplus3 >env

JAVA_HOME=/opt/IBM/WebSphere/AppServer/java
LANG=C
LC_ALL=C
LC_CTYPE=C
LOGNAME=root
MAIL=/var/mail//root
PATH=/usr/sbin:/usr/bin
SHELL=/sbin/sh
TERM=xterm
TZ=US/Mountain
USER=root
WSHOME=/idm_staging

root@pplus3 >/opt/IBM/WebSphere/AppServer/java/bin/java -version
java version "1.4.2_05"
Java(TM) 2 Runtime Environment, Standard Edition (IBM build 1.4.2_05-b04 20041029)
Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)
IBM Java ORB build orb142-20041021
XML build XSLT4J Java 2.6.3
XML build XmlCommonsExternal 1.2.04
XML build XML4J 4.3.3


IBM WebSphere Application Server - ND, 6.0.0.1
Build Number: o0445.08
Build Date: 11/10/04
---------------------------------------

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

I have been in support for about 10 years now and have been doing IDM support for 5 years now. I have been working for SUN for 9 years and have supported the whole JES Stack during that time.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today