Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368816

Summary: Corrupted accented field names with HPROF dumps
Product: [Tools] MAT Reporter: Andrew Johnson <andrew_johnson>
Component: CoreAssignee: Andrew Johnson <andrew_johnson>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Andrew Johnson CLA 2012-01-17 06:59:10 EST
From code inspection and testing Pass1Parser.readString() converts constant pool names to Strings using the default encoding, not UTF-8.
This means that if the file.encoding is not utf-8 then the conversion will be wrong.

Test by creating a dump from executing this code:
public class Abc {
   static int A\u00C0 = 3;
   int B\u00D0 = 3;
   static Abc x = new Abc();
   public static void main(String args[]) {
   }
}
and running MAT with -Dfile.encoding=8859_1
Comment 1 Andrew Johnson CLA 2012-01-17 07:08:13 EST
Solution is to convert bytes using UTF-8.