summaryrefslogtreecommitdiffstats
path: root/gallerycommon/src/com/android/gallery3d/exif
diff options
context:
space:
mode:
authorEarl Ou <shunhsingou@google.com>2012-10-18 15:58:01 +0800
committerEarl Ou <shunhsingou@google.com>2012-10-24 11:13:21 +0800
commitd260c45b728462f5d3f1b6a4489a767022f39a9e (patch)
treefa5a6c42f7533a79870b5c23d69032815d0be17d /gallerycommon/src/com/android/gallery3d/exif
parentc83287e4524fa1c9d562e5aab48d57b3a198d52d (diff)
downloadandroid_packages_apps_Snap-d260c45b728462f5d3f1b6a4489a767022f39a9e.tar.gz
android_packages_apps_Snap-d260c45b728462f5d3f1b6a4489a767022f39a9e.tar.bz2
android_packages_apps_Snap-d260c45b728462f5d3f1b6a4489a767022f39a9e.zip
Use 'US-ASCII' as the default charset for ExifParser
Change-Id: I775c84e601f8d33010080b189efd8c2de00d6959
Diffstat (limited to 'gallerycommon/src/com/android/gallery3d/exif')
-rw-r--r--gallerycommon/src/com/android/gallery3d/exif/ExifParser.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/gallerycommon/src/com/android/gallery3d/exif/ExifParser.java b/gallerycommon/src/com/android/gallery3d/exif/ExifParser.java
index f1e52c5b3..56f722afb 100644
--- a/gallerycommon/src/com/android/gallery3d/exif/ExifParser.java
+++ b/gallerycommon/src/com/android/gallery3d/exif/ExifParser.java
@@ -650,14 +650,14 @@ public class ExifParser {
}
/**
- * 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 "";
}