#10440: preparser does not correctly identify encoding lines
----------------------------+-----------------------------------------------
   Reporter:  ddrake        |       Owner:  ddrake            
       Type:  defect        |      Status:  positive_review   
   Priority:  major         |   Milestone:  sage-4.6.2        
  Component:  misc          |    Keywords:  preparser encoding
     Author:  Dan Drake     |    Upstream:  N/A               
   Reviewer:  Volker Braun  |      Merged:                    
Work_issues:                |  
----------------------------+-----------------------------------------------
Description changed by vbraun:

Old description:

> [http://www.python.org/dev/peps/pep-0263/ PEP 263] says that the encoding
> line for a Python file should match a certain regular expression in the
> first or second line, but the preparser seems to be looking for the
> precise string "# -*- coding: utf-8 -*-".
>
> We should follow PEP 263 precisely. In particular, this will make it easy
> for SageTeX users to specify an encoding; because of TeX weirdness that I
> don't entirely understand, it is easiest to write the line "## -*-
> coding: utf-8 -*-" to the generated script.

New description:

 [http://www.python.org/dev/peps/pep-0263/ PEP 263] says that the encoding
 line for a Python file should match a certain regular expression in the
 first or second line, but the preparser seems to be looking for the
 precise string "# -*- coding: utf-8 -*-".

 We should follow PEP 263 precisely. In particular, this will make it easy
 for SageTeX users to specify an encoding; because of TeX weirdness that I
 don't entirely understand, it is easiest to write the line "## -*- coding:
 utf-8 -*-" to the generated script.

   * Apply `trac_10440.patch` to the sage library repository.
   * Apply `trac_10440_scripts_repo.patch` to the sage scripts repository.

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10440#comment:9>
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