tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Galbayar" <galba...@mobicom.mn>
Subject Re: Japanese Coding
Date Tue, 19 Feb 2002 04:27:07 GMT
try this

      FileOutputStream fileOut = new FileOutputStream( "EUC-JP.txt");
      BufferedOutputStream bufferedOut = new BufferedOutputStream( fileOut);
      PrintWriter out =  new PrintWriter( new OutputStreamWriter(
bufferedOut, "EUC-JP" ));

      for ( char k = 0x3044; k < 0x3048; k++) out.print( k );
      out.close();
   FileInputStream fileIn = new FileInputStream("EUC-JP.txt");
      BufferedInputStream bufferedIn = new BufferedInputStream( fileIn );
      InputStreamReader in = new InputStreamReader( bufferedIn, "EUC-JP");
   in.read();
  StringBuffer sb=new StringBuffer();
  while (in.ready())
  {
   int onechar=in.read();
   sb.append((char)onechar);
   System.out.println(1);
  }
  fileOut = new FileOutputStream( "SHIFT_JIS.txt");
    bufferedOut =  new BufferedOutputStream( fileOut);
     out = new PrintWriter( new OutputStreamWriter( bufferedOut,
"Shift_JIS" ));
  out.println(sb.toString());
  out.close();


----- Original Message -----
From: "Moi" <god@heaven.club.ne.jp>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Tuesday, February 19, 2002 11:24
Subject: Japanese Coding


> How to convert Japanese JIS(or EUC-JP) encoded String to SHIFT-JIS?
> Is there any string coversion class or method in Java?
>
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
>
>
>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message