Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
codec for byte transparency
#7
Can you give an example? When you say "the string is already encoded", I don't know how that works. I expect a python str() to be a set of unicode code points. To get it out, we need some encoding for those code points. If you're using the str() as something other than unicode, you'll probably need to give details.

Your first post said the s = ''.join(chr(x)for x in b) step was sufficient. If so, I didn't see how a latin1 decoding was any different.
Reply


Messages In This Thread
codec for byte transparency - by Skaperen - Sep-18-2020, 02:24 AM
RE: codec for byte transparency - by bowlofred - Sep-18-2020, 03:01 AM
RE: codec for byte transparency - by Skaperen - Sep-18-2020, 03:12 AM
RE: codec for byte transparency - by DeaD_EyE - Sep-18-2020, 06:56 AM
RE: codec for byte transparency - by bowlofred - Sep-18-2020, 07:23 AM
RE: codec for byte transparency - by Skaperen - Sep-18-2020, 10:35 PM
RE: codec for byte transparency - by bowlofred - Sep-18-2020, 11:06 PM
RE: codec for byte transparency - by Skaperen - Sep-25-2020, 02:20 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in position 562: ord ctrldan 23 10,306 Apr-24-2023, 03:40 PM
Last Post: ctrldan
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd2 in position 16: invalid cont Melcu54 3 11,546 Mar-26-2023, 12:12 PM
Last Post: Gribouillis
  [SOLVED] [Debian] UnicodeEncodeError: 'ascii' codec Winfried 1 1,745 Nov-16-2022, 11:41 AM
Last Post: Winfried
  UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 34: character Melcu54 7 30,745 Sep-26-2022, 10:09 AM
Last Post: Melcu54
  ASCII-Codec in Python3 [SOLVED] AlphaInc 4 9,907 Jul-07-2021, 07:05 PM
Last Post: AlphaInc
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 error from Mysql call AkaAndrew123 1 4,437 Apr-28-2021, 08:16 AM
Last Post: AkaAndrew123
  'utf-8' codec can't decode byte 0xe2 in position 122031: invalid continuation byte tienttt 12 16,984 Sep-18-2020, 10:10 PM
Last Post: tienttt
  'charmap' codec louis216 4 24,324 Jun-30-2020, 06:25 AM
Last Post: louis216
  'utf-8' codec can't decode byte 0xda in position 184: invalid continuation byte karkas 8 58,142 Feb-08-2020, 06:58 PM
Last Post: karkas
  Which codec can help me decode the html source? vivekagrey 4 4,401 Jan-10-2020, 09:33 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020