Opened 14 months ago
Closed 11 months ago
#27598 closed defect (duplicate)
Unicode problem with SageTeX
Reported by: | jhpalmieri | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | packages: standard | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Running SageTeX with Python 2 on this file fails:
\documentclass{article} \usepackage{sagetex} \begin{document} \begin{sageblock} s = "hello á goodbye" \end{sageblock} \end{document}
(With Python 3, I think it works.) The error occurs when running Sage:
$ sage junk.sagetex.sage Processing Sage code for junk.tex... Code block (line 5) begin...end Traceback (most recent call last): File "junk.sagetex.sage.py", line 16, in <module> _st_.endofdoc() File "/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python2.7/site-packages/sagetex.py", line 276, in endofdoc m.update(bytearray(line,'utf8')) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 14: ordinal not in range(128)
Change History (5)
comment:1 Changed 14 months ago by
comment:2 Changed 12 months ago by
this is hopefully fixed in #27968, which includes the recently merged PR that deals with this issue.
comment:3 Changed 12 months ago by
- Status changed from new to needs_review
please confirm that #27968 provides the fix, then this can be closed.
comment:4 Changed 12 months ago by
- Milestone changed from sage-8.8 to sage-duplicate/invalid/wontfix
- Status changed from needs_review to positive_review
Confirmed. Marked as duplicate.
comment:5 Changed 11 months ago by
- Resolution set to duplicate
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
The problem is with the use of the
bytearray
function. With Python 2:With Python 3: