dtmilano / AndroidViewClient

Android ViewServer and ADB client
Apache License 2.0
1.62k stars 347 forks source link

Encoding issues with dump/traverse #75

Open Nawick opened 10 years ago

Nawick commented 10 years ago

Hello, and thanks for your work with AndroidViewClient ! I am "unfortunately" French and the android components I have to test contains several accents (By the way, all my apologies if my English is approximate).

It seems there is an encoding issue when I use : vc.traverse(transform=ViewClient.TRAVERSE_CIT)

I'll get something like : android.widget.FrameLayout id/no_id/1 android.view.View id/no_id/2 android.widget.TextView id/no_id/3 R├®glages android.widget.TextView id/no_id/4 Tutoriel android.widget.TextView id/no_id/5 Aide android.widget.TextView id/no_id/6 ├Ç propos

I should get something like this : android.widget.FrameLayout id/no_id/1 android.view.View id/no_id/2 android.widget.TextView id/no_id/3 Réglages android.widget.TextView id/no_id/4 Tutoriel android.widget.TextView id/no_id/5 Aide android.widget.TextView id/no_id/6 À propos

I don't have this issue when using android monitor or hierarchyviewer. I also tried to add a # -- coding: utf-8 -- statement with no luck.

Do you have an idea how to correct this point ?

Nawick commented 10 years ago

I've noticed that I don't have accents issues when using the code below : vc.dump() dumpy = vc.getViewsById() for val in dumpy.values(): print val.getClass() + " : " + val.getUniqueId() + " -> " + val.getText();

If issues could be prioritize, I would say it's now a minor one !