On 16 August 2016 at 14:24, Anthony Briggs <[email protected]> wrote:
> Hi Mike,
>
> I was just trying to solve a similar problem at the PyconAU sprints :)
>
> The error is that there are some things / Unicode strings which don't
> translate to Windows 'charmap' characters, and can't be printed to the
> terminal. You can replicate it with this code:
>
> print("M├┐ h├┤v├¿r├ºr├áft ├«├ƒ f├╗┼él ├Âf ├®├¬l┼ø".encode("cp1252"))
The print() is redundant here, the function call is never reached;
this is different to the example, where it is the print itself that is
failing.
print("M├┐ h├┤v├¿r├ºr├áft ├«├ƒ f├╗┼él ├Âf ├®├¬l┼ø")
will also reproduce the error, but for a different reason: stdout now
fails to encode.
--
William Leslie
Notice:
Likely much of this email is, by the nature of copyright, covered
under copyright law. You absolutely MAY reproduce any part of it in
accordance with the copyright law of the nation you are reading this
in. Any attempt to DENY YOU THOSE RIGHTS would be illegal without
prior contractual agreement.
_______________________________________________
melbourne-pug mailing list
[email protected]
https://mail.python.org/mailman/listinfo/melbourne-pug