Home > other >  Please god help me, I want to ask how to decode
Please god help me, I want to ask how to decode

Time:03-12

I'm compiling a program that is Shared memory, and such and such software read data cannot be decoded, want to please solve my younger brother's confusion and below is the procedure and the results

CodePudding user response:

Feeling is written and read the code type does not match

CodePudding user response:

Don't like utf-8 data, why is \ x00?

CodePudding user response:

Python decode () method to encoding the specified encoding format decoding string, the default encoding for string coding,

Syntax
Decode () method syntax:

STR. Decode (encoding="utf-8", errors='strict')
Parameter
Encoding - coding is used, such as "utf-8",

Errors - set different error handling scheme, defaults to "strict", meaning coding errors cause a UnicodeError, other possible values have 'ignore', 'replace', 'xmlcharrefreplace', 'backslashreplace and codecs. Register_error () the registration of any value,

Can consider to ignore, but best and data communication, unified coding
  • Related