google / smali

Other
175 stars 29 forks source link

Invalid text error using emojis (UTF-16) #22

Open giacomoferretti opened 1 year ago

giacomoferretti commented 1 year ago

Emojis don't match the lexer.

They should match SimpleNameCharacter but they don't for some reason. For example 🍉 is \ud83c\udf49 which corresponds to HighSurrogate and LowSurrogate respectively.

Example

Command: java -jar smali.jar tokens test.smali

Input

invoke-virtual {p0}, Lsample/SampleActivity;->🍉()V

Output

Error for input '🍉': Invalid text
INVALID_TOKEN("\ud83c\udf49")