Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sage chokes on utf-8 in .sage files #2593

Closed
malb opened this issue Mar 19, 2008 · 3 comments
Closed

Sage chokes on utf-8 in .sage files #2593

malb opened this issue Mar 19, 2008 · 3 comments

Comments

@malb
Copy link
Member

malb commented Mar 19, 2008

On Tuesday 18 March 2008, Lars Fischer wrote:

Hello,

this question is related to the thread "SAGE chokes on French
character":
http://groups.google.com/group/sage-support/browse_thread/thread/af850956c4
ed137f/34a34d6cf23c4d89?lnk=gst&q=encoding#34a34d6cf23c4d89 two weeks ago.
As I understand it, there is a patch which works only for the notebook.

I want to use umlauts or more general utf-8 encoded files attached to
a sage session in a console. (In Python I would use
# -- encoding: utf-8 --
as second line magic encoding hint, but the preparser prepends its
three line "This file was *autogenerated.... comment and destroys the
encoding hint mechanism .)

If I delete the preparser comment, so that the encoding line becomes
the second line, then python and sage print the umlaut and the error
"Non-ASCII character '\xc3' in file .... " does not occur.

Component: user interface

Issue created by migration from https://trac.sagemath.org/ticket/2593

@malb malb added this to the sage-2.11 milestone Mar 19, 2008
@malb malb self-assigned this Mar 19, 2008
@malb
Copy link
Member Author

malb commented Mar 19, 2008

allow utf-8 in .sage files

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Mar 19, 2008

comment:1

Attachment: trac_2593.patch.gz

Nice patch, it fixes the issue and applies cleanly to my 2.11.alpha0 tree. Positive review.

Cheers,

Michael

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Mar 19, 2008

comment:2

Merged in Sage 2.11.alpha0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant