Modify

Opened 7 years ago

Closed 14 months ago

#2012 closed defect (wontfix)

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

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

Description (last modified by rjollos)

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 bogado 7 years ago.
Diff for a fix to this problem
git_plugin.2.diff (1.3 KB) - added by bogado 7 years ago.
Patch that do not break the view file operation.

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by bogado

Diff for a fix to this problem

comment:1 Changed 7 years ago by bogado

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 7 years ago by bogado

Patch that do not break the view file operation.

comment:2 Changed 7 years ago by bogado

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

comment:3 Changed 4 years ago by anonymous

  • Keywords UTF-8 added; utf-8 removed

comment:4 Changed 14 months ago by rjollos

  • Description modified (diff)

comment:5 Changed 14 months ago by rjollos

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

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

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from sjain. Next status will be '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.