adb logcat log garbled problem
When using adb to debug Andoid's viewing log, I found that the Chinese log is garbled, as follows
For the method of adb debugging Android view log, please refer to my article: https://blog.csdn.net/linxinfa/article/details/104578095
Garbled reason
This is because the CMD default character set is ANSI, in the Chinese environment it is GBK, and the code page is 936. In Android, UTF-8 characters are used.
The method to query the current code page is to directly enter the chcp
command under CMD
Solution
As long as the code page 65001 in UTF-8 format is used, the command is as follows: chcp 65001
Then re-use the logcat command to view the log to display the Chinese log normally