Hi Java-Delhi!

We are reading some multilanguual files through InputStreamReader. While 
reading this file we are getting this exception.
############
[java] Exception in thread "main" sun.io.MalformedInputException 
[java] at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java(Compiled Code)) 
[java] at 
sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:287) 
[java] atsun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:337) 
[java] at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:223) 
[java] at java.io.InputStreamReader.read(InputStreamReader.java:208) 
[java] at java.io.BufferedReader.read1(BufferedReader.java:202) 
[java] at java.io.BufferedReader.read(BufferedReader.java:278) 
[java] at java.io.BufferedReader.fill(BufferedReader.java(Compiled Code )) 
[java] at java.io.BufferedReader.readLine(BufferedReader.java(Compiled Code)) 
[java] at java.io.BufferedReader.readLine(BufferedReader.java:379) 
[java] at com.aceva.util.StringUtil.streamConnect(StringUtil.java:175) 
[java] at com.aceva.util.StringUtil.readerToString(StringUtil.java:164) 
[java] at com.aceva.util.StringUtil.fileToString(StringUtil.java:212) 
[java] at com.aceva.util.StringUtil.fileToString(StringUtil.java:200) 
########

System Env is:
---------------------
Java :  1.4.2, J2RE 1.4.2 IBM AIX build ca142sr1aifx-2005
0413 (142SR1a + 82052 + 85266) (JIT enabled: jitc))


We are able to read the same file through Byte Stream array without any 
exception.
------------------
OS is AIX 5.3
bash-3.00# oslevel -r
5300-01

When tried opening the same file in AIX using vi editor 
it gives the error : "ex: 0602-169 Incomplete or invalid m
ultibyte character encountered, conversion failed." some number of 
times and can view the file. 
But after making a little modification and save again in Unix env this problem
disappears. This is probably due to end of line behaviour different in Unix & 
Windows.

But still these files are shown with english characters i.e special characters 
are omitted.

#locale -a 
shows mebash-3.00# locale -a
C 
POSIX 
en_US
en_US.8859-15
en_US.ISO8859-1
en_CA
en_CA.8859-15
FR_CA
FR_CA.UTF-8
EN_US
EN_US.UTF-8
EN_CA
EN_CA.UTF-8
fr_CA
fr_CA.8859-15
fr_CA.ISO8859-1
ES_MX
ES_MX.UTF-8
es_MX
es_MX.8859-15
NL_NL
NL_NL.UTF-8
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
nl_NL
nl_NL.8859-15
[EMAIL PROTECTED]
nl_NL.IBM-1252
[EMAIL PROTECTED]
nl_NL.ISO8859-1
[EMAIL PROTECTED]
[EMAIL PROTECTED]
JA_JP
JA_JP.UTF-8
ja_JP
ja_JP.IBM-eucJP
Ja_JP
Ja_JP.IBM-943
Ja_JP.IBM-932
ZH_CN
ZH_CN.UTF-8
zh_CN
zh_CN.IBM-eucCN

bash-3.00#echo $LANG
en_US


Please help!!

Thanks
Yashpal Nagar

_______________________________________________
Java mailing list
[email protected]
http://mail.jug-delhi.org/mailman/listinfo/java_jug-delhi.org

Reply via email to