[Chicago] Getting ASCII encoding where unicode wanted under Py3k

Steve Schwarz steve at agilitynerd.com
Tue May 14 02:28:44 CEST 2013


In addition to simplifying your failure case, as Carl mentions, you might
also look at this SO question:
http://stackoverflow.com/questions/12752313/unicodedecodeerror-in-python-3-when-importing-a-csv-file

Your terminal might not like non-ascii encodings (you could write to a file
to verify that also).

Best Regards,
Steve
http://tech.agilitynerd.com


On Mon, May 13, 2013 at 12:01 PM, Carl Karsten <carl at personnelware.com>wrote:

> On Mon, May 13, 2013 at 10:59 AM, Jonathan Hayward
> <jonathan.hayward at pobox.com> 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 works.  may need a few other lines, or something.
> It is also possible that there is a setting in your OS that has an effect.
>
> What OS?
>
> --
> Carl K
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20130513/d60b92ee/attachment.html>


More information about the Chicago mailing list