|
wdsci-l-bounces@xxxxxxxxxxxx wrote on 01/25/2005 02:57:09 AM: > I'm currently using the free plugin from softlanding.com for viewing the spool > files, but I have a problem in viewing the accentuated characters. e.g. "é" > appears as "," > > Is there something to change ? A parameter to put the CSSID ? Or is this > plugin done only for unaccentuated characters ? It is probably a limitation in the IBM code that is transforming the spooled file to a text file. There are a lot of spooled file features that do not come through in this mode. That is why we provide the option to create the TIFF file as that seems to always give an accurate representation of the file. I wouldn't want to do it to just look at a joblog or compile listing, but if there is something you really need to see, that is your best option. Here is the code we use to create the text file. It is just using classes from the IBM Java Toolbox. If someone wants to point out a way to make it work for all CCSID's, I will be glad to change it. package com.softlanding.spooledfiles; import java.io.*; import com.ibm.as400.access.*; public class SaveToTextFile implements ISaveToFile { public final static String PLAIN_TEXT = "/QSYS.LIB/QWPDEFAULT.WSCST"; public SaveToTextFile() { super(); } public void saveAs(SpooledFile splf, OutputStream out) throws RequestNotSupportedException, InterruptedException, AS400Exception, IOException, ErrorCompletingRequestException, AS400SecurityException { PrintObjectTransformedInputStream in = null; try { PrintParameterList printParms = new PrintParameterList(); printParms.setParameter( PrintObject.ATTR_WORKSTATION_CUST_OBJECT, PLAIN_TEXT); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // get the text (via a transformed input stream) from the spooled file in = splf.getTransformedInputStream(printParms); byte[] buffer = new byte[8 * 1024]; int count = 0; do { out.write(buffer, 0, count); count = in.read(buffer, 0, buffer.length); } while (count != -1); } finally { try { in.close(); } catch (IOException e) { } if (out != null) { try { out.close(); } catch (IOException e) { } } } } } _____________________________________________________________________________ Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs. _____________________________________________________________________________
As an Amazon Associate we earn from qualifying purchases.
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.