in reply to The module version works, but the standlone version crashes with "Malformed UTF-8 character"

Hi, since you are on Windows I would pay attention to the encoding of your file. MSFT often uses UTF-16, and if you try to decode that as if it were UTF-8 you could see that error IIUC.

Related info on "middle byte" that has bitten me with JSON data: https://tools.ietf.org/html/rfc4627#section-3.

Hope this helps!


The way forward always starts with a minimal test.
  • Comment on Re: The module version works, but the standlone version crashes with "Malformed UTF-8 character"