| 
 | 
> From: eiichi.yoshihira@xxxxxxxxxxxxx
> 
>             FileInputStream fin = new FileInputStream(args[0]);
>             InputStreamReader isr = new InputStreamReader(fin,
"Cp930");
>             FileOutputStream fout = new
> FileOutputStream(args[0]+".SJIS");
>             OutputStreamWriter osw = new OutputStreamWriter(fout,
> "SJIS");
This is fine for files, but I'm having trouble implementing it in a web
application.  In my web-app, I have a byte array of EBCDIC data that I
need to output to the browser.
The meta-tags are already set up for Shift-JIS, so the question is, how
can I actually write Shift-JIS to the output stream?
I can do this:
String s = new String(b, "Cp930");
Okay, now I have a Unicode string representing the correct Katakana.
Now, how do I get those that Unicode data into a Shift-JIS String to
output?  When I try to just write the String (using <%= s %>), I just
get question marks.
Do I have to now convert to SJIS bytes and then back to a String?
byte[] b = s.getBytes("SJIS");
s = new String(b);   // Default encoding
Is this what I need?
(ANSWERING MY OWN QUESTION: YES!!!!)
I have an output field that just gave me the following error:
合言葉を入力して下さい。
PSC/400 is now DBCS enabled.  How totally cool.
Joe
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.