美文网首页python随记
SIM800C GSM读取中文短信内容python3解码

SIM800C GSM读取中文短信内容python3解码

作者: LCSan | 来源:发表于2021-09-29 16:53 被阅读0次
    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