From d260c45b728462f5d3f1b6a4489a767022f39a9e Mon Sep 17 00:00:00 2001 From: Earl Ou Date: Thu, 18 Oct 2012 15:58:01 +0800 Subject: Use 'US-ASCII' as the default charset for ExifParser Change-Id: I775c84e601f8d33010080b189efd8c2de00d6959 --- gallerycommon/src/com/android/gallery3d/exif/ExifParser.java | 4 ++-- 1 file 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 ""; } -- cgit v1.2.3