× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I guess you got your answers!
>合言葉を入力して下さい。
"Enter your password"
 
Regards,
Eiichi

        -----Original Message----- 
        From: java400-l-bounces@xxxxxxxxxxxx 代理 Joe Pluta 
        Sent: 2004/01/30 (金) 9:12 
        To: 'Java Programming on and around the iSeries / AS400' 
        Cc: 
        Subject: RE: DBCS to Shift-JIS
        
        

        > 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
        
        _______________________________________________
        This is the Java Programming on and around the iSeries / AS400 
(JAVA400-L) mailing list
        To post a message email: JAVA400-L@xxxxxxxxxxxx
        To subscribe, unsubscribe, or change list options,
        visit: http://lists.midrange.com/mailman/listinfo/java400-l
        or email: JAVA400-L-request@xxxxxxxxxxxx
        Before posting, please take a moment to review the archives
        at http://archive.midrange.com/java400-l.
        
        



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in 
error, please notify the sender immediately and delete the original.  Any other 
use of the email by you is prohibited.


This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in 
error, please notify the sender immediately and delete the original.  Any other 
use of the email by you is prohibited.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.