geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r947095 - /geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/store/nntp/newsrc/NNTPNewsrcFile.java
Date Fri, 21 May 2010 17:51:18 GMT
Author: rickmcguire
Date: Fri May 21 17:51:18 2010
New Revision: 947095

URL: http://svn.apache.org/viewvc?rev=947095&view=rev
Log:
GERONIMO-5326 Geronimo javamail does not work on non-ASCII platforms

Modified:
    geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/store/nntp/newsrc/NNTPNewsrcFile.java

Modified: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/store/nntp/newsrc/NNTPNewsrcFile.java
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/store/nntp/newsrc/NNTPNewsrcFile.java?rev=947095&r1=947094&r2=947095&view=diff
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/store/nntp/newsrc/NNTPNewsrcFile.java
(original)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/store/nntp/newsrc/NNTPNewsrcFile.java
Fri May 21 17:51:18 2010
@@ -27,6 +27,7 @@ import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
 import java.io.Writer;
+import java.nio.charset.Charset;
 
 public class NNTPNewsrcFile extends NNTPNewsrc {
     // source for the file data
@@ -50,7 +51,7 @@ public class NNTPNewsrcFile extends NNTP
      * @exception IOException
      */
     public BufferedReader getInputReader() throws IOException {
-        return new BufferedReader(new InputStreamReader(new FileInputStream(source)));
+        return new BufferedReader(new InputStreamReader(new FileInputStream(source), Charset.forName("ISO8859-1")));
     }
 
     /**
@@ -61,6 +62,6 @@ public class NNTPNewsrcFile extends NNTP
      */
     public Writer getOutputWriter() throws IOException {
         // open this for overwriting
-        return new OutputStreamWriter(new FileOutputStream(source, false));
+        return new OutputStreamWriter(new FileOutputStream(source, false), Charset.forName("ISO8859-1"));
     }
 }



Mime
View raw message