import binascii
binary_string = binascii.unhexlify("30104F174FE160A054C965C56E383011").decode("utf-16be")
print(binary_string)
参考:
https://www.cnblogs.com/1x11/p/12507175.html
这里主要问题在于字符集,windows默认是utf-16le,这里要用utf-16be。挨个试出来的!!!
import binascii
binary_string = binascii.unhexlify("30104F174FE160A054C965C56E383011").decode("utf-16be")
print(binary_string)
参考:
https://www.cnblogs.com/1x11/p/12507175.html
这里主要问题在于字符集,windows默认是utf-16le,这里要用utf-16be。挨个试出来的!!!
本文标题:SIM800C GSM读取中文短信内容python3解码
本文链接:https://www.haomeiwen.com/subject/eomjnltx.html
网友评论