Opened 12 years ago

Closed 7 years ago

#6682 closed defect (fixed)

Support non-ASCII characters in Sage sources

Reported by: robertwb Owned by: tbd
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: build Keywords:
Cc: mvngu, kini Merged in:
Authors: Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by mpatel)

This involves at least fixing the documentation build process and trac to support utf-8. Possibly other components as well.

Discussion in August 2009.

More recent discussion here.

Attachments (1)

prependify.py (1.5 KB) - added by mpatel 11 years ago.
Script to prepend coding to .py(x) files. Not a patch.

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by mpatel

Script to prepend coding to .py(x) files. Not a patch.

comment:1 Changed 11 years ago by mpatel

  • Cc mvngu added
  • Report Upstream set to N/A

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 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,
    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.

comment:2 Changed 11 years ago by mpatel

  • Description modified (diff)

comment:3 Changed 9 years ago by kini

  • Cc kini added

comment:4 Changed 8 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:5 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:6 Changed 7 years ago by jdemeyer

  • Milestone changed from sage-6.2 to sage-duplicate/invalid/wontfix
  • Reviewers set to Jeroen Demeyer
  • Status changed from new to needs_review

We already do support UTF-8 in Sage sources, nothing to see here...

comment:7 Changed 7 years ago by jdemeyer

  • Status changed from needs_review to positive_review

comment:8 Changed 7 years ago by vbraun

  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.