Re: [Chicago] Getting ASCII encoding where unicode wanted under Py3k

2013-05-13 Thread Carl Karsten
On Mon, May 13, 2013 at 10:59 AM, Jonathan Hayward wrote: That is way too much code for me to try and dig into. Remove everything not needed to demo it. Replace big strings with little strings. My guess is it should be 1-3 lines, like >>> print('123%(a)s' % {'a': u'\u0161' } ) 123ลก But that

Re: Getting ASCII encoding where unicode wanted under Py3k

2013-05-13 Thread MRAB
On 13/05/2013 16:59, Jonathan Hayward wrote: I have a Py3k script, pasted below. When I run it I get an error about ASCII codecs that can't handle byte values that are too high. The error that I am getting is: |UnicodeEncodeError: 'ascii' codec can't encode character'\u0161' in position 1442

Re: Getting ASCII encoding where unicode wanted under Py3k

2013-05-13 Thread Peter Pearson
On Mon, 13 May 2013 10:59:33 -0500, Jonathan Hayward wrote: > --e89a8f3b9db145cbab04dc9b9a23 > Content-Type: text/plain; charset=windows-1252 > Content-Transfer-Encoding: quoted-printable > [snipped many lines of quoted-printable muck] > My code is below. What should I be doing differently to be,

Getting ASCII encoding where unicode wanted under Py3k

2013-05-13 Thread Jonathan Hayward
I have a Py3k script, pasted below. When I run it I get an error about ASCII codecs that can't handle byte values that are too high. The error that I am getting is: UnicodeEncodeError: 'ascii' codec can't encode character '\u0161' in position 1442: ordinal not in range(128) args = ('ascii',