Ticket #4975 (closed defect: fixed)
[with patch, positive review] Sage 3.2.2 chokes on utf-8 encoded files
| Reported by: | mkasperski | Owned by: | mhansen |
|---|---|---|---|
| Priority: | critical | Milestone: | sage-3.3 |
| Component: | user interface | Keywords: | |
| Cc: | Author(s): | ||
| Report Upstream: | Reviewer(s): | ||
| Merged in: | Work issues: |
Description
I just downloaded sage 3.2.2 and found it to choke on utf-8 encoded source files (for comparison, sage 3.0 handles them properly). My bet is that some problem happened during integration of issue 2637. Tested using sage-3.2.2-ubuntu32bit-intel-i686-Linux binary distribution.
Take the file like:
# -*- coding: utf-8 -*- """ Zażółć gęślą jaźń """ print 1
and try:
$ sage test.sage
Result:
File "test.py", line 6 SyntaxError: Non-ASCII character '\xc5' in file test.py on line 7, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
Produced file:
# This file was *autogenerated* from the file test.sage. from sage.all_cmdline import * # import sage library _sage_const_1 = Integer(Integer(1))# -*- coding: utf-8 -*- """ Zażółć gęślą jaźń """ print _sage_const_1
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

