Python Forum
'utf-8' codec can't decode byte 0xda in position 184: invalid continuation byte
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'utf-8' codec can't decode byte 0xda in position 184: invalid continuation byte
#7
Quote:No this is where i placed the file,you can choose whatever place you like.
Rember that python and pip should work from any folder same for all OS,for Windows look here
So a test like this should work no matter which folder on OS you are in.

Oh yes, I actually learned this when following your advice in the first reply to use chardet. I had to add the python path to the environmental variables and then install pip to be able to install chardet.

Quote:That use cmder a much better shell than cmd/Poweshell.

That would be another thing for me to look at and learn.


Quote:When i use rb then i read file in binary(no encoding).
With Unicode still need to decode to a encoding.

I actually meant these two examples:

C:\code
λ chardetect myfile.txt
myfile.txt: ascii with confidence 1.0
# copy of text in post and save as utf-8
λ chardetect test.srt
test.srt: utf-8 with confidence 0.505
Thank you very much for your help and all your insights. This has been great because it's given me a lot more to study and learn.

Best regards.
Reply


Messages In This Thread
RE: 'utf-8' codec can't decode byte 0xda in position 184: invalid continuation byte - by karkas - Sep-12-2019, 08:51 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Search for multiple unknown 3 (2) Byte combinations in a file. lastyle 7 1,380 Aug-14-2023, 02:28 AM
Last Post: deanhystad
Question UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in position 562: ord ctrldan 23 4,886 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 5,030 Mar-26-2023, 12:12 PM
Last Post: Gribouillis
  Decode string ? JohnnyCoffee 1 832 Jan-11-2023, 12:29 AM
Last Post: bowlofred
  extract only text strip byte array Pir8Radio 7 3,001 Nov-29-2022, 10:24 PM
Last Post: Pir8Radio
  [SOLVED] [Debian] UnicodeEncodeError: 'ascii' codec Winfried 1 1,037 Nov-16-2022, 11:41 AM
Last Post: Winfried
  sending byte in code? korenron 2 1,134 Oct-30-2022, 01:14 PM
Last Post: korenron
  UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 34: character Melcu54 7 19,067 Sep-26-2022, 10:09 AM
Last Post: Melcu54
  Byte Error when working with APIs Oshadha 2 1,022 Jul-05-2022, 05:23 AM
Last Post: deanhystad
  UnicodeEncodeError: 'ascii' codec can't encode character '\xfd' in position 14: ordin Armandito 6 2,744 Apr-29-2022, 12:36 PM
Last Post: Armandito

Forum Jump:

User Panel Messages

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