I use BCEL library to extract bytecode from a particular Method. To do that, I use getCode() function from BCEL Method class.
When I do:
String code = metod.getCode().toString();
System.out.print(code);
If you look at lcd opcode, I get this:
but, I would like to have that (for lcd opcode):
If I use JavaP to decompile, the result is as the second picture.
The problem is in the encoding, which I think should be UTF-8. I look on other topics how to change encoding, but I am not sure that this is the problem.
How can I have good string encoding using BCEL ?
EDIT:
First picture is from Java console. Second picture is from dirtyJOE v1.5