Modify

Ticket #256 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

TracNav cannot handle non-ASCII text in r3085 or later

Reported by: gotoh@… Owned by: moschny
Priority: normal Milestone:
Component: trac.tracnav Version:
Severity: major Keywords:
Cc:

Description

In changes in r3085, it is changed to use cStringIO. By this change, we cannot use japanese TOC text. I made workaround for this by simply reverting use of cStringIO.

  • tracnav.py

     
    6464from trac.web.chrome import ITemplateProvider, add_stylesheet 
    6565from trac.wiki.model import WikiPage 
    6666from trac.wiki.formatter import Formatter, OneLinerFormatter 
    67 try: 
    68     from cStringIO import StringIO 
    69 except ImportError: 
    70     from StringIO import StringIO 
     67from StringIO import StringIO 
    7168 
    7269 
    7370TRACNAVHOME = "http://svn.ipd.uka.de/trac/javaparty/wiki/TracNav" 

Attachments

Change History

comment:1 Changed 7 years ago by moschny

Are you sure that this is a problem of cStringIO per se? For testing, I just added some japanese text to the our SandBox/TOC and it seems to work.

comment:2 Changed 7 years ago by Shun-ichi Goto <gotoh@…>

I'm using trac trunk 0.10dev (r3131) which is bit differ from 0.9.x around internal string treatment. WikiPage().text (which is toc_text) is unicode string on 0.10dev. So cStringIO.write() will be failed.

comment:3 Changed 7 years ago by moschny

  • Status changed from new to closed
  • Resolution set to fixed

Confirmed problem with 0.10dev, reverted to using StringIO in r3093. Thanks for the bug report!

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.