Unicode issue on Windows cmd line

2009-02-11 Thread jeffg
Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error. Works fine in IDLE, PythonWin, and my Macbook but I need to run this from a windows batch. Character should look like this ð. Please help! -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Albert Hopkins
On Wed, 2009-02-11 at 10:35 -0800, jeffg wrote: Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error. Works fine in IDLE, PythonWin, and my Macbook but I need to run this from a windows batch. Character should look like this ð. Please help! You

Re: Unicode issue on Windows cmd line

2009-02-11 Thread jeffg
On Feb 11, 2:35 pm, Albert Hopkins mar...@letterboxes.org wrote: On Wed, 2009-02-11 at 10:35 -0800, jeffg wrote: Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error. Works fine in IDLE, PythonWin, and my Macbook but I need to run this from a

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Benjamin Kaplan
On Wed, Feb 11, 2009 at 2:50 PM, jeffg jeffgem...@gmail.com wrote: On Feb 11, 2:35 pm, Albert Hopkins mar...@letterboxes.org wrote: On Wed, 2009-02-11 at 10:35 -0800, jeffg wrote: Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error.

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Karen Tracey
On Wed, Feb 11, 2009 at 2:50 PM, jeffg jeffgem...@gmail.com wrote: On Feb 11, 2:35 pm, Albert Hopkins mar...@letterboxes.org wrote: On Wed, 2009-02-11 at 10:35 -0800, jeffg wrote: Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error.

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Martin v. Löwis
Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error. Works fine in IDLE, PythonWin, and my Macbook but I need to run this from a windows batch. Character should look like this ð. Please help! Well, your terminal just cannot display this

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Benjamin Kaplan
On Wed, Feb 11, 2009 at 3:57 PM, Martin v. Löwis mar...@v.loewis.dewrote: Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error. Works fine in IDLE, PythonWin, and my Macbook but I need to run this from a windows batch. Character should look

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Benjamin Kaplan
On Wed, Feb 11, 2009 at 4:10 PM, Benjamin Kaplan benjamin.kap...@case.eduwrote: On Wed, Feb 11, 2009 at 3:57 PM, Martin v. Löwis mar...@v.loewis.dewrote: Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error. Works fine in IDLE, PythonWin, and

Re: Unicode issue on Windows cmd line

2009-02-11 Thread MRAB
Benjamin Kaplan wrote: [snip] Whoops. Didn't mean to hit send there. I was going to say, you can't have everything when Microsoft is only willing to break the programs that average people are going to use on a daily basis. I mean, why would they do something nice for the international

Re: Unicode issue on Windows cmd line

2009-02-11 Thread jeffg
On Feb 11, 3:57 pm, Martin v. Löwis mar...@v.loewis.de wrote: Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error. Works fine in IDLE, PythonWin, and my Macbook but I need to run this from a windows batch. Character should look like this ð.

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Benjamin Kaplan
On Wed, Feb 11, 2009 at 5:10 PM, jeffg jeffgem...@gmail.com wrote: On Feb 11, 3:57 pm, Martin v. Löwis mar...@v.loewis.de wrote: Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error. Works fine in IDLE, PythonWin, and my Macbook but I need

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Martin v. Löwis
Thanks, I ended up using encode('iso-8859-15', replace) Perhaps more up to date than cp1252...?? It still didn't print correctly, but it did write correctly, which was my main problem. If you encode as iso-8859-15, but this is not what your terminal expects, it certainly won't print

Re: Unicode issue on Windows cmd line

2009-02-11 Thread jeffg
On Feb 11, 6:30 pm, Martin v. Löwis mar...@v.loewis.de wrote: Thanks, I ended up using encode('iso-8859-15', replace) Perhaps more up to date than cp1252...?? It still didn't print correctly, but it did write correctly, which was my main problem. If you encode as iso-8859-15, but this

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Gabriel Genellina
En Wed, 11 Feb 2009 23:11:37 -0200, jeffg jeffgem...@gmail.com escribió: On Feb 11, 6:30 pm, Martin v. Löwis ma...@v.loewis.de wrote: Thanks, I ended up using encode('iso-8859-15', replace) Perhaps more up to date than cp1252...?? If you encode as iso-8859-15, but this is not what your

Re: Unicode issue on Windows cmd line

2009-02-11 Thread jeffg
On Feb 11, 10:00 pm, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Wed, 11 Feb 2009 23:11:37 -0200, jeffg jeffgem...@gmail.com escribió: On Feb 11, 6:30 pm, Martin v. Löwis ma...@v.loewis.de wrote: Thanks, I ended up using encode('iso-8859-15', replace) Perhaps more up to date