#6682: Support non-ASCII characters in Sage sources
------------------------+---------------------------------------------------
   Reporter:  robertwb  |       Owner:  tbd       
       Type:  defect    |      Status:  new       
   Priority:  major     |   Milestone:  sage-4.3.2
  Component:  build     |    Keywords:            
     Author:            |    Upstream:  N/A       
   Reviewer:            |      Merged:            
Work_issues:            |  
------------------------+---------------------------------------------------
Changes (by mpatel):

 * cc: mvngu (added)
  * upstream:  => N/A


Comment:

 From my brief experience with Unicode in SageNB sources (#7249 adds them
 to doctests), we may just need to

  * Prepend `# -*- coding: utf-8 -*-` to every .py file.  I assume we
 should do this for .pyx files, too.  I've attached a
 [attachment:prependify.py script] that can do this, although I'm sure
 there are more succinct ways.

  * Use `unicode` strings for docstrings that contain non-ASCII Unicode
 characters.  For example,
 {{{
 #!python
 def f(n):
     u"""
     Transmogrifies ``n``, heinously. ☺
     """
     return transmogrify(n, algorithm='heinous')
 }}}

 Note: At #8000, Minh suggested polling sage-devel about allowing non-ASCII
 characters in Sage library code.  I'll try to do this soon.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6682#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB
-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.


Reply via email to