On 2018-10-20 05:24:37 -0700, pjmcle...@gmail.com wrote: > On Saturday, October 13, 2018 at 7:24:14 PM UTC-4, MRAB wrote: > > with open(join("docs", path), encoding="utf-8") as f: > > hello MRAB and google forum
I feel somewhat excluded by this salutaton, as I'm not MRAB and I don't read this on Google Groups, but I'll answer anyway ;-). > i have a sort of decode error it seems now very close to the line in my script > which you solved for my 2 previous encode errors in python 3 > > the error now is > ************** > UnicodeDecodeError; 'utf-8' can't decode byte 0xb0 in position 83064: invalid > start byte [...] > would the solution fix be this? > ********************** > data = f.read(), decoding = "utf-8" #OR > data = f.read(), decoding = "ascii" # is this the right fix or previous or > both wrong?? 0xB0 isn't a valid ASCII character, so you'll get a decoding error for open(..., encoding="ascii"), too. You will have to find out the correct encoding for your file and use that. hp -- _ | Peter J. Holzer | we build much bigger, better disasters now |_|_) | | because we have much more sophisticated | | | h...@hjp.at | management tools. __/ | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>
signature.asc
Description: PGP signature
-- https://mail.python.org/mailman/listinfo/python-list