Skip to content

Conversation

@majiayu000
Copy link

Summary

  • Add errors='ignore' parameter to subprocess.run() in get_current_app() function
  • Fixes Windows GBK/UTF-8 encoding conflict when reading ADB output
  • Add test to verify encoding parameters

Problem

On Windows systems, ADB output may contain mixed encoding characters that cause:

UnicodeDecodeError: 'gbk' codec can't decode byte 0xb4 in position 70: illegal multibyte sequence

Solution

Add errors='ignore' to the subprocess.run() call to gracefully handle encoding issues.

Fixes #241

…lity

Fix Windows GBK/UTF-8 encoding conflict in get_current_app function.
On Windows systems, ADB output may contain mixed encoding characters
that cause UnicodeDecodeError. Adding errors='ignore' parameter allows
the function to gracefully handle these encoding issues.

Fixes zai-org#241
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows读取命令,GBK和UTF-8编码冲突报错

1 participant