About 33,200 results
Open links in new tab
  1. python - Converting byte string in unicode string - Stack Overflow

    Dec 12, 2012 · In strings (or Unicode objects in Python 2), \u has a special meaning, namely saying, "here comes a Unicode character specified by it's Unicode ID". Hence u"\u0432" will …

  2. getting bytes from unicode string in python - Stack Overflow

    Aug 24, 2019 · Python 2: u'\u4132'.encode('utf-16be') Python 3: '\u4132'.encode('utf-16be') These methods return a byte array, which you can convert to an int array easily. But note that code …

  3. python - Decoding bytes as unicode string - Stack Overflow

    Feb 1, 2021 · The problem is that the question combines both unicode escaping and escaping binary values. In other words, the unicode string can contain some sequence that represents …

  4. How to fix: "UnicodeDecodeError: 'ascii' codec can't decode byte"

    Python 3. Python 3 is no more Unicode capable than Python 2.x is, however it is slightly less confused on the topic. E.g the regular str is now a Unicode string and the old str is now bytes. …

  5. python - UnicodeDecodeError, invalid continuation byte - Stack …

    Dec 11, 2016 · So ISO-8859-1 Unicode points 0–255 are identical to the Latin-1 values, so converting to this encoding simply requires converting code points to byte values; if a code …

  6. byte string vs. unicode string. Python - Stack Overflow

    Apr 8, 2012 · A unicode string is made up of unicode characters. In stringobject above, the unicode characters are the individual letters, e.g. a, n, t. Each unicode character is assigned a …

  7. Python: UnicodeDecodeError: 'utf8' codec can't decode byte

    Aug 12, 2012 · UnicodeDecodeError: 'utf8' codec can't decode byte 0xba in position 1266: invalid start byte 2 UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 0: invalid …

  8. python - UnicodeDecodeError when reading CSV file in Pandas

    One starts with all the standard encodings available for the python version (in this case 3.7 python 3.7 standard encodings). A usable python list of the standard encodings for the different …

  9. python - UnicodeDecodeError: 'utf8' codec can't decode byte 0x9c ...

    Sep 18, 2012 · I have a socket server that is supposed to receive UTF-8 valid characters from clients. The problem is some clients (mainly hackers) are sending all the wrong kind of data …

  10. python - Convert unicode string to byte string - Stack Overflow

    Jun 24, 2012 · How to convert a string to unicode/byte string in Python 3? 2. Python3 change string to byte. 1.