Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368816 - Corrupted accented field names with HPROF dumps
Summary: Corrupted accented field names with HPROF dumps
Status: RESOLVED FIXED
Alias: None
Product: MAT
Classification: Tools
Component: Core (show other bugs)
Version: 1.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Andrew Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-17 06:59 EST by Andrew Johnson CLA
Modified: 2012-01-17 07:08 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.