|
Problem |
If you package xml files within a war file to be used by
an application, and if you have problems reading these files when you run
the application, it is possible this is an encoding problem. |
|
Cause |
If you use an InputStreamReader to read the xml files, but
do not specify the character encoding when the reader was created within
the application, the reader defaults to the operating system EBCDIC
character encoding. As a result, you cannot read the files because they
are encoded in UTF-8 format. |
|
Solution |
You can resolve the problem in one of the following ways:
- Specify the character encoding as UTF-8 when creating the
InputStreamReader because the xml files within the ear file are packaged
as UTF-8.
or
- Use a different object reader within the application code that
defaults to UTF-8 when reading the xml files.
or
- Convert the xml files to EBCDIC, and package them within the ear file
before deploying them to WebSphere Application Server using the System
Management End User Interface (SMEUI).
When porting applications from the distributed platform to z/OS, be aware
that the default code page for z/OS is different from the distributed
platform (code page 1047 versus UTF-8). You might need to modify
applications ported from the distributed platform to z/OS that use streams
and readers/writers to explicitly specify the UTF-8 code page.
|
|
|
|
Cross Reference information |
Segment |
Product |
Component |
Platform |
Version |
Edition |
Application Servers |
WebSphere Application Server for z/OS |
Deploy (for example: AAT or ANT or EAR/WAR/JAR) |
|
|
|
|
|
|
|