When using google protocol buffers to transfer String character,got messy code
问题 In debug view: Here is the code which encodes into messy string... ((S2CEnterCollection)objS2c).toByteString().toStringUtf8(); Output: ���"default( ���"default( ���"default( ���"default( ���"default( ����"default( ����"default( �����"default( Here is the code which has the right string: ((S2CEnterCollection)objS2c).toString() The original string was: cardList { cardId: 100001 liked: 100 number: 10 finder: "default" rank: 1 } cardList { cardId: 100002 liked: 123 number: 10 finder: "default"