Use 'US-ASCII' as the default charset for ExifParser
Change-Id: I775c84e601f8d33010080b189efd8c2de00d6959
diff --git a/gallerycommon/src/com/android/gallery3d/exif/ExifParser.java b/gallerycommon/src/com/android/gallery3d/exif/ExifParser.java
index f1e52c5..56f722a 100644
--- a/gallerycommon/src/com/android/gallery3d/exif/ExifParser.java
+++ b/gallerycommon/src/com/android/gallery3d/exif/ExifParser.java
@@ -650,14 +650,14 @@
}
/**
- * Reads a String from the InputStream with UTF8 charset.
+ * Reads a String from the InputStream with US-ASCII charset.
* This is used for reading values of type {@link ExifTag#TYPE_ASCII}.
*/
public String readString(int n) throws IOException {
if (n > 0) {
byte[] buf = new byte[n];
mTiffStream.readOrThrow(buf);
- return new String(buf, 0, n - 1, "UTF8");
+ return new String(buf, 0, n - 1, "US-ASCII");
} else {
return "";
}