commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1291388 - in /commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/jpeg: JpegImageParser.java segments/ComSegment.java
Date Mon, 20 Feb 2012 17:51:38 GMT
Author: damjan
Date: Mon Feb 20 17:51:37 2012
New Revision: 1291388

URL: http://svn.apache.org/viewvc?rev=1291388&view=rev
Log:
UTF-8 seems like a more reasonable choice to expect
when reading JPEG COM sections.


Modified:
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/jpeg/JpegImageParser.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/jpeg/segments/ComSegment.java

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/jpeg/JpegImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/jpeg/JpegImageParser.java?rev=1291388&r1=1291387&r2=1291388&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/jpeg/JpegImageParser.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/jpeg/JpegImageParser.java
Mon Feb 20 17:51:37 2012
@@ -795,7 +795,7 @@ public class JpegImageParser extends Ima
             ComSegment comSegment = (ComSegment) commentSegments.get(i);
             String comment = "";
             try {
-                comment = new String(comSegment.comment, "ISO-8859-1");
+                comment = new String(comSegment.comment, "UTF-8");
             } catch (UnsupportedEncodingException cannotHappen) {
             }
             Comments.add(comment);

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/jpeg/segments/ComSegment.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/jpeg/segments/ComSegment.java?rev=1291388&r1=1291387&r2=1291388&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/jpeg/segments/ComSegment.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/jpeg/segments/ComSegment.java
Mon Feb 20 17:51:37 2012
@@ -49,7 +49,7 @@ public class ComSegment extends Segment
     {
         String commentString = "";
         try {
-            commentString = new String(comment, "ISO-8859-1");
+            commentString = new String(comment, "UTF-8");
         } catch (UnsupportedEncodingException cannotHappen) {
         }
         return "COM (" + commentString + ")";



Mime
View raw message