When I config trac using scoped repository, which path name contains
non-ascii characters, will raise UnicodeDecodeError in trac-admin
resync and browser:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position
8: ordinal not in range(128)

Test in trac 0.10.4, 0.11 and 0.12, all have the same problem.

Don't know whether this problem is fixed by others, I just make a
patch:

Index: svn_fs.py
===================================================================
@@ -111,7 +111,7 @@
     """Check whether the given `fullpath` is within the given
`scope`"""
     if scope == '/':
         return fullpath is not None
-    fullpath = fullpath and fullpath.lstrip('/') or ''
+    fullpath = to_unicode(fullpath and fullpath.lstrip('/') or '')
     scope = scope.strip('/')
     return (fullpath + '/').startswith(scope + '/')

@@ -404,7 +404,7 @@
         Repository.__init__(self, name, authz, log)

         if self.path != path:
-            self.scope = path[len(self.path):]
+            self.scope = to_unicode(path[len(self.path):])
             if not self.scope[-1] == '/':
                 self.scope += '/'
         else:

Shall I create a ticket for this problem?

Regards

Richard
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" 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/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to