On 5/20/2015 3:44 AM, anatoly techtonik wrote:

This was intended to add status for bugs.python.org, but the work on
Roundup had stalled due to uncertainty and despair on how to handle
utf-8 (internal to Roundup) vs unicode (internal to Jinja2) in this issue:
http://issues.roundup-tracker.org/issue2550811
The root of the problem is that Python 2.7 uses 'ascii' and not 'utf-8'
internally, so Jinja2 engine fails with 'ascii' ordinal not in range
somewhere in the way. Need an expert advice how to handle that, because
my brain power is not enough to process it.

In my view, the root of the problem is using Python 2 and working with encoded bytes. The fix is to upgrade to Python 3.3+, with an improved text model (unicode str class), and work with text. Follow the standard process: decode encoded bytes to text when received from browsers, work internally with text, and encode output just before sending to browsers.

--
Terry Jan Reedy

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to