aboutsummaryrefslogtreecommitdiffstats
path: root/traceview/src
diff options
context:
space:
mode:
authorMathew Inwood <mathewi@google.com>2011-08-17 17:47:11 +0100
committerXavier Ducrohet <xav@android.com>2011-08-17 14:50:02 -0700
commit0ff2839a7009ac1675d4fe9ce2d27ccf2947ecec (patch)
tree4660e2164aa5b65d2bd1e7d66b925a6aefc2c747 /traceview/src
parent168e27a3d37e983726a82e66950f03926e7ea52f (diff)
downloadsdk-0ff2839a7009ac1675d4fe9ce2d27ccf2947ecec.zip
sdk-0ff2839a7009ac1675d4fe9ce2d27ccf2947ecec.tar.gz
sdk-0ff2839a7009ac1675d4fe9ce2d27ccf2947ecec.tar.bz2
Fix failure when non-ASCII characters encountered.
Change-Id: I42405b0b1ceb576ae12330e487f0f7dee870e527
Diffstat (limited to 'traceview/src')
-rw-r--r--traceview/src/com/android/traceview/DmTraceReader.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/traceview/src/com/android/traceview/DmTraceReader.java b/traceview/src/com/android/traceview/DmTraceReader.java
index ac44a09..d75ba8c 100644
--- a/traceview/src/com/android/traceview/DmTraceReader.java
+++ b/traceview/src/com/android/traceview/DmTraceReader.java
@@ -20,8 +20,8 @@ import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
-import java.io.FileReader;
import java.io.IOException;
+import java.io.InputStreamReader;
import java.nio.BufferUnderflowException;
import java.nio.ByteOrder;
import java.nio.MappedByteBuffer;
@@ -404,7 +404,8 @@ public class DmTraceReader extends TraceReader {
long parseKeys() throws IOException {
BufferedReader in = null;
try {
- in = new BufferedReader(new FileReader(mTraceFileName));
+ in = new BufferedReader(new InputStreamReader(
+ new FileInputStream(mTraceFileName), "US-ASCII"));
} catch (FileNotFoundException ex) {
System.err.println(ex.getMessage());
}