unable to print Unicode characters in Python 3

John Machin sjmachin at lexicon.net
Mon Jan 26 18:53:02 EST 2009


On Jan 27, 9:42 am, "Martin v. Löwis" <mar... at v.loewis.de> wrote:
> > I was hoping to find something that allows me to print any Unicode
> > character on the console.
>
> You will have to debug the Python interpreter to find out what's
> going wrong in code page 65001. Nobody has ever resolved that mystery,
> although it's been known for some time.

Maybe the problem is not in the Python interpreter. Running this tiny
C program

#include "stdio.h"
int main(int argc, char **argv) {
    printf("<\xc2\x80>\n");
    }

compiled with mingw32 (gcc (GCC) 3.4.5 (mingw-vista special r3))
and using "Lucida Console" font:

After CHCP 1252, this prints < A-circumflex Euro >, as expected.
After CHCP 65001, it prints < hollow-square >.

Perhaps you could try that with an MS C compiler [which I don't
have] ...



More information about the Python-list mailing list