This ticket is related to my question on sage-support:
http://groups.google.com/group/sage-support/browse_thread/thread/dab6a0880fa8b942
and Martin Albrecht's patch.
With Martin's patch, sage scripts default to utf-8 encoding, which is a good default as ascii is a subset of utf-8, it is compatible with existing sage-scripts.
But I think that a user should be able to select a coding, if utf-8 is not suitable for him. For example a user with an editor not supporting unicode or a user needing utf-16. So sage should support python encoding hints.
Please see the attached patch to sage/misc/interpreter.py, which tries to find out if the first line contains an encoding hint. If true, use the line from the file, else print the utf-8 encoding hint.
With best regards,
Lars Fischer