michael-o commented on a change in pull request #18: IMAGING-168 installing 
package with Swedish characters adds junk char…
URL: https://github.com/apache/commons-imaging/pull/18#discussion_r309674642
 
 

 ##########
 File path: 
src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcParser.java
 ##########
 @@ -438,8 +477,8 @@ public int compare(final IptcRecord e1, final IptcRecord 
e2) {
                 }
                 bos.write(element.iptcType.getType());
 
-                final byte[] recordData = element.value.getBytes("ISO-8859-1");
-                if (!new String(recordData, 
"ISO-8859-1").equals(element.value)) {
+                final byte[] recordData = 
element.value.getBytes(DEFAULT_ENCODING);
+                if (!new String(recordData, 
DEFAULT_ENCODING).equals(element.value)) {
                     throw new ImageWriteException(
                             "Invalid record value, not ISO-8859-1");
 
 Review comment:
   This should also use `DEFAULT_ENCODING

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to