Modify

Opened 17 years ago

Closed 11 years ago

#2012 closed defect (wontfix)

The module does not work with unicode data in the repository.

Reported by: anonymous Owned by: Samat Jain
Priority: normal Component: TracGitPlugin
Severity: major Keywords: UTF-8 unicode
Cc: Trac Release: 0.10

Description (last modified by Ryan J Ollos)

I installed the plugin but it gave the following error when I tried to run it :

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.5/site-packages/trac/versioncontrol/web_ui/browser.py", line 143, in process_request
    self._render_directory(req, repos, node, rev)
  File "/usr/lib/python2.5/site-packages/trac/versioncontrol/web_ui/browser.py", line 168, in _render_directory
    changes = get_changes(self.env, repos, [i['rev'] for i in info])
  File "/usr/lib/python2.5/site-packages/trac/versioncontrol/web_ui/util.py", line 47, in get_changes
    shorten=True, absurls=absurls)
  File "/usr/lib/python2.5/site-packages/trac/wiki/formatter.py", line 1009, in wiki_to_oneliner
    return Markup(out.getvalue())
  File "/usr/lib/python2.5/site-packages/trac/util/html.py", line 46, in __new__
    return unicode.__new__(self, text)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 7: ordinal not in range(128)

I don't know much python, but my investigation into issue made me believe that this is a problem when trac is attempting to encode a utf-8, witch trac believes is ascii, into utf-8.

Attachments (2)

git_plugin.diff (801 bytes) - added by Victor Bogado da Silva Lins 17 years ago.
Diff for a fix to this problem
git_plugin.2.diff (1.3 KB) - added by Victor Bogado da Silva Lins 17 years ago.
Patch that do not break the view file operation.

Download all attachments as: .zip

Change History (7)

Changed 17 years ago by Victor Bogado da Silva Lins

Attachment: git_plugin.diff added

Diff for a fix to this problem

comment:1 Changed 17 years ago by Victor Bogado da Silva Lins

The patch I submitted earlier broke the viewing of files, I did a more deep research and found a way that it works for me. There may be other places to put a to_unicode call, that are not causing problems with mine repository (path names?)

The better solution would be to inform the output, witch is a pipe as far as I can see, to return unicoded strings from it's read method. I don't know hot to do this.

Changed 17 years ago by Victor Bogado da Silva Lins

Attachment: git_plugin.2.diff added

Patch that do not break the view file operation.

comment:2 Changed 17 years ago by Victor Bogado da Silva Lins

ops. The patch has the fix for the other issue (ticket #2013). Just ignore the second group of changes.

comment:3 Changed 13 years ago by anonymous

Keywords: UTF-8 added; utf-8 removed

comment:4 Changed 11 years ago by Ryan J Ollos

Description: modified (diff)

comment:5 Changed 11 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

Tickets should no longer be filed against TracGitPlugin. See GitPlugin or Git support in Trac 1.0.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Samat Jain.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.