On Mar 31, 12:30 pm, vakaras <[EMAIL PROTECTED]> wrote:
> > The patch has been merged in Sage 2.11 which should be out today.
> > Alternatively you can download  the patch, cd into $SAGE_ROOT/devel/
> > sage, do an "hg import ../foo/bar.patch", cd back into $SAGE_ROOT and
> > do a "./sage -b". Assuming you have a compiler installed it should
> > work, especially if you compiled from scratch yourself.
>
> Now in file sage/devel/sage/sage/misc/interpreter.py line 375 is
> out.write('# -*- encoding: utf-8 -8-\n')
> but this doesn't helped.
>

Ok, I think I figured out what the problem is:

a) print "klaidelė" from inside Sage 2.10.4 or higher via command
line: works

b) running "sage foo.py" where foo.py consits of 'print "klaidelė"':

  File "foo.py", line 1
SyntaxError: Non-ASCII character '\xc4' in file utf8.py on line 1, but
no encoding declared; see http://www.python.org/peps/pep-0263.html for
details
sage: Error running utf8.py using Python
[EMAIL PROTECTED]:/scratch/mabshoff/release-cycle/sage-3.0.alpha0$ sage
utf8.py
  File "utf8.py", line 1
SyntaxError: Non-ASCII character '\xc4' in file utf8.py on line 1, but
no encoding declared; see http://www.python.org/peps/pep-0263.html for
details
sage: Error running utf8.py using Python

c) running foo.py as in_
[start foo.py]
# -*- encoding: utf-8 -8-
print "klaidelė"
[end foo.py]
works:
sage foo.py
klaidelė


So, is (c) a bug in Sage or shut it be the users job to set the
encoding? Alternatively we could check if any encoding is set and if
not default to utf-8.

Thought?

Cheers,

Michael
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to