Exercise 23 from LCTHW

When I use utf-16 encoding and write that it in the command line argument, I get:

UnicodeError: UTF-16 stream does not start with BOM

When I use utf-32 encoding and write that in the command line argument, I get:

UnicodeDecodeError: ‘utf-32-le’ codec can’t decode bytes in position 0-3: code point not in range(0x110000)

Can anybody tell me what this means and how I can correct the error? I do not understand it at all.

For those to work your input file would need to be in utf-16 and utf-32.

At this point I’m going to say you’ve overlearned this and need to move on. Just learning about encode/decode and utf-8 is enough for now.