Beta release of pip version 10
p.f.moore at gmail.com
Sun Apr 1 06:26:28 EDT 2018
On 1 April 2018 at 04:15, Mikhail V <mikhailwas at gmail.com> wrote:
> MRAB writes:
>> > UnicodeEncodeError: 'charmap' codec can't encode character
>> > when it meets a non-ascii char.
>> > e.g. tried this:
>> > pip search pygame > a.txt
>> Well, _I_ didn't get an error!
>> One of the lines is:
>> kundalini (0.4) - LրVE-like PyGame API
>> So it's down to what system encoding (active code page) is in use.
> Dunno, it gives me error regardless of active codepage,
> my default is 866, i've set to 1252 or 65001, same error.
> The output itself is fine - I see correct glyphs, so the error
> only appears when I redirect to file.
> if I try some python script e.g. "a.py":
> print ("абв")
> and run:
> py a.py > a.txt
> I get some gibberish in the file.
> So it is probably a global issue. Nothing works in this life :)
That actually sounds more like a redirection issue. Redirecting in the
cmd shell uses the OEM codepage, I believe, and Python outputs to a
pipe using the ANSI codepage, IIRC (I'd have to check to be certain).
More information about the Python-list