hi
1:
how do you export into an excel sheet?
2:
if you write a simple text file with the same application is the euro and yen
character in the text file?
3:
simple code to read a file with euro and umlauts
| public String readISO8859Message(String filename) {
|
| String fileStore = new String();
| Charset charset = Charset.forName("ISO-8859-1");
| //Charset charset = Charset.forName("ISO-8859-15");
| CharsetDecoder decoder = charset.newDecoder();
| CharsetEncoder encoder = charset.newEncoder();
|
| try {
|
| FileChannel inCh = (new
FileInputStream(filename)).getChannel();
| int size = (int) inCh.size();
|
| //log.debug("Filesize: " + size);
|
| ByteBuffer buf = ByteBuffer.allocate(size);
| CharBuffer cbuf = CharBuffer.allocate(size);
| inCh.read(buf);
| buf.rewind();
| decoder.decode(buf, cbuf, false);
| cbuf.flip();
| cbuf.rewind();
| fileStore = cbuf.toString();
| inCh.close();
|
|
| } catch (Exception ex) {
| //log.error(ex.toString());
|
| }
|
| return fileStore;
| }
|
cheers
L
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3883693#3883693
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3883693
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user