notishell / smali

Automatically exported from code.google.com/p/smali
0 stars 0 forks source link

Patch for /dexlib/src/main/java/org/jf/dexlib/Util/Utf8Utils.java #130

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
it should be v2

why not simply using the below code, because is only for JAVA 1.6+?
private static final Charset UTF8 = Charset.forName("UTF-8");
...
return new String(bytes, start, length, UTF8);

Original issue reported on code.google.com by yyjdel...@gmail.com on 13 Jul 2012 at 9:28

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks. This code was taken from 
dalvik/dx/src/com/android/dx/rop/cst/CstString.java in AOSP. I confirmed that 
the bug exists there as well (I'll submit a patch there as well).

I don't use the UTF-8 charset because it's using a slightly modified for of 
utf-8, as mentioned in the comment on the stringToUtf8Bytes method.

Original comment by jesusfreke@jesusfreke.com on 14 Jul 2012 at 1:17

GoogleCodeExporter commented 9 years ago
Done.

https://code.google.com/p/smali/source/detail?r=66b89545a4b397a7e90dff7f8fff5349
c074dcae

Original comment by jesusfreke@jesusfreke.com on 14 Jul 2012 at 1:32

GoogleCodeExporter commented 9 years ago
Oh, can I ask another question here? (Sorry for any inconvenience)
Sometimes, maybe too hurried and careless, we will leave some unused registers 
like this:

.locals 5
return-void
# We requested 5 local registers but none is used. Wasteful ...

Will smali take care of this?

Original comment by chen.92...@gmail.com on 7 Feb 2014 at 2:45

GoogleCodeExporter commented 9 years ago
Oh ... so sorry for asking in the wrong place.

Original comment by chen.92...@gmail.com on 7 Feb 2014 at 2:47