InvalidURL: URL was not a plain ASCII url

Bug #675014 reported by Stas Kalashnikov
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Undecided
Unassigned
Trac-Bzr
Fix Committed
Medium
Martin von Gagern
0.3
Fix Committed
Medium
Alexander Belchenko

Bug Description

I have files with Russian names in my Bazaar repository. When I click on in through Browse Source, I get the following error:

InvalidURL: Invalid url supplied to transport: "trunk/doc/ТорговляАвтозапчастями.doc": URL was not a plain ASCII url: 'ascii' codec can't encode characters in position 10-31: ordinal not in range(128)

Most recent call last:

    * File "c:/docume~1/admin/locals~1/temp/easy_install-5uzcpm/Trac-0.12.1-py2.6-win32.egg.tmp/trac/web/main.py", line 511, in _dispatch_request
      Code fragment:
      Line
      506 try:
      507 if not env and env_error:
      508 raise HTTPInternalError(env_error)
      509 try:
      510 dispatcher = RequestDispatcher(env)
      511 dispatcher.dispatch(req)
      512 except RequestDone:
      513 pass
      514 resp = req._response or []
      515
      516 except HTTPException, e:
      Local variables:
      Name Value
      dispatcher <trac.web.main.RequestDispatcher object at 0x02537530>
      e InvalidURL(Invalid url supplied to transport: ...
      env <trac.env.Environment object at 0x01CD11F0>
      env_error None
      req <Request "GET ...
      resp []
    * File "c:/docume~1/admin/locals~1/temp/easy_install-5uzcpm/Trac-0.12.1-py2.6-win32.egg.tmp/trac/web/main.py", line 237, in dispatch
      Code fragment:
      Line
      232 msg = _('Do you have cookies enabled?')
      233 raise HTTPBadRequest(_('Missing or invalid form token.'
      234 ' %(msg)s', msg=msg))
      235
      236 # Process the request and render the template
      237 resp = chosen_handler.process_request(req)
      238 if resp:
      239 if len(resp) == 2: # Clearsilver
      240 chrome.populate_hdf(req)
      241 template, content_type = \
      242 self._post_process_request(req, *resp)
      Local variables:
      Name Value
      chosen_handler <trac.versioncontrol.web_ui.browser.BrowserModule object at 0x0257C570>
      chrome <trac.web.chrome.Chrome object at 0x02576E70>
      err (<class 'bzrlib.errors.InvalidURL'>, InvalidURL(Invalid url supplied to ...
      handler <trac.versioncontrol.web_ui.browser.BrowserModule object at 0x0257C570>
      req <Request "GET ...
      self <trac.web.main.RequestDispatcher object at 0x02537530>
    * File "c:/docume~1/admin/locals~1/temp/easy_install-5uzcpm/Trac-0.12.1-py2.6-win32.egg.tmp/trac/versioncontrol/web_ui/browser.py", line 371, in process_request
      Code fragment:
      Line
      366 if rev:
      367 rev = repos.normalize_rev(rev)
      368 # If `rev` is `None`, we'll try to reuse `None` consistently,
      369 # as a special shortcut to the latest revision.
      370 rev_or_latest = rev or repos.youngest_rev
      371 node = get_existing_node(req, repos, path, rev_or_latest)
      372 except NoSuchChangeset, e:
      373 raise ResourceNotFound(e.message,
      374 _('Invalid changeset number'))
      375
      376 context = context(repos.resource.child('source', path,
      Local variables:
      Name Value
      all_repositories {'': {'name': '', 'dir': u'D:\\srv\\ftp\\vbk-repo', 'id': 1}}
      context <Context >
      desc False
      display_rev <function <lambda> at 0x025710F0>
      node None
      order 'name'
      path u'trunk/doc/\u0422\u043e\u0440\u0433\u043e\u0432\u043b\u044f\u0410\u0432\u0 ...
      presel None
      reponame None
      repos BzrRepository('file:///D:/srv/ftp/vbk-repo/')
      req <Request "GET ...
      rev None
      rev_or_latest 'current:'
      rm <trac.versioncontrol.api.RepositoryManager object at 0x0257C710>
      self <trac.versioncontrol.web_ui.browser.BrowserModule object at 0x0257C570>
      xhr False
    * File "c:/docume~1/admin/locals~1/temp/easy_install-5uzcpm/Trac-0.12.1-py2.6-win32.egg.tmp/trac/versioncontrol/web_ui/util.py", line 64, in get_existing_node
      Code fragment:
      Line
      59 })
      60 return links
      61
      62 def get_existing_node(req, repos, path, rev):
      63 try:
      64 return repos.get_node(path, rev)
      65 except NoSuchNode, e:
      66 # TRANSLATOR: You can 'search' in the repository history... (link)
      67 search_a = tag.a(_("search"),
      68 href=req.href.log(path, rev=rev, mode='path_history'))
      69 raise ResourceNotFound(tag(
      Local variables:
      Name Value
      path u'trunk/doc/\u0422\u043e\u0440\u0433\u043e\u0432\u043b\u044f\u0410\u0432\u0 ...
      repos BzrRepository('file:///D:/srv/ftp/vbk-repo/')
      req <Request "GET ...
      rev 'current:'
    * File "C:/Python26/lib/site-packages/tracbzr-0.4.2-py2.6.egg/tracbzr/backend.py", line 581, in get_node
      Code fragment:
      Line
      576 path = self.normalize_path(path)
      577 if rev is None:
      578 rev = self._escape_revid(CURRENT_REVISION)
      579 revbranch, revid = self._parse_rev(rev)
      580 try:
      581 branch, relpath = self.get_containing_branch(path)
      582 except errors.NotBranchError:
      583 if not self.root_transport.has(path):
      584 raise versioncontrol.NoSuchNode(path, rev)
      585 return UnversionedDirNode(self, revbranch, revid, path)
      586 if revbranch is None:
      Local variables:
      Name Value
      path u'trunk/doc/\u0422\u043e\u0440\u0433\u043e\u0432\u043b\u044f\u0410\u0432\u0 ...
      rev 'current:'
      revbranch None
      revid 'current:'
      self BzrRepository('file:///D:/srv/ftp/vbk-repo/')
    * File "C:/Python26/lib/site-packages/tracbzr-0.4.2-py2.6.egg/tracbzr/backend.py", line 461, in get_containing_branch
      Code fragment:
      Line
      456 self._locked_branches.append(branch)
      457 self._branch_cache[location] = BranchCache(self, branch)
      458 return branch
      459
      460 def get_containing_branch(self, location):
      461 branch, relpath = containing_branch(self.root_transport, location)
      462 real_location = location[:-len(relpath)].rstrip('/')
      463 if real_location not in self._branch_cache:
      464 self._branch_cache[real_location] = BranchCache(self, branch)
      465 self._locked_branches.append(branch)
      466 # return the cached version, possibly throwing away the one we just
      Local variables:
      Name Value
      location u'trunk/doc/\u0422\u043e\u0440\u0433\u043e\u0432\u043b\u044f\u0410\u0432\u0 ...
      self BzrRepository('file:///D:/srv/ftp/vbk-repo/')
    * File "C:/Python26/lib/site-packages/tracbzr-0.4.2-py2.6.egg/tracbzr/backend.py", line 1343, in containing_branch
      Code fragment:
      Line
      1338 yield (path, kindmap[kind], self.EDIT, other.id2path(file_id),
      1339 self.bzr_repo.string_rev(self.branch, parent_revid))
      1340
      1341
      1342 def containing_branch(transport, path):
      1343 child_transport = transport.clone(path)
      1344 my_bzrdir, relpath = \
      1345 bzrdir.BzrDir.open_containing_from_transport(child_transport)
      1346 return my_bzrdir.open_branch(), relpath
      1347
      1348
      Local variables:
      Name Value
      path u'trunk/doc/\u0422\u043e\u0440\u0433\u043e\u0432\u043b\u044f\u0410\u0432\u0 ...
      transport <bzrlib.transport.local.LocalTransport url=file:///D:/srv/ftp/vbk-repo/>
    * File "C:/Python26/lib/site-packages/bzrlib/transport/local.py", line 86, in clone
      Code fragment:
      Line
      81 we can just return a new object.
      82 """
      83 if offset is None:
      84 return LocalTransport(self.base)
      85 else:
      86 abspath = self.abspath(offset)
      87 if abspath == 'file://':
      88 # fix upwalk for UNC path
      89 # when clone from //HOST/path updir recursively
      90 # we should stop at least at //HOST part
      91 abspath = self.base
      Local variables:
      Name Value
      offset u'trunk/doc/\u0422\u043e\u0440\u0433\u043e\u0432\u043b\u044f\u0410\u0432\u0 ...
      self <bzrlib.transport.local.LocalTransport url=file:///D:/srv/ftp/vbk-repo/>
    * File "C:/Python26/lib/site-packages/bzrlib/transport/local.py", line 111, in abspath
      Code fragment:
      Line
      106 """Return the full url to the given relative URL."""
      107 # TODO: url escape the result. RBC 20060523.
      108 # jam 20060426 Using normpath on the real path, because that ensures
      109 # proper handling of stuff like
      110 path = osutils.normpath(osutils.pathjoin(
      111 self._local_base, urlutils.unescape(relpath)))
      112 # on windows, our _local_base may or may not have a drive specified
      113 # (ie, it may be "/" or "c:/foo").
      114 # If 'relpath' is '/' we *always* get back an abspath without
      115 # the drive letter - but if our transport already has a drive letter,
      116 # we want our abspaths to have a drive letter too - so handle that
      Local variables:
      Name Value
      relpath u'trunk/doc/\u0422\u043e\u0440\u0433\u043e\u0432\u043b\u044f\u0410\u0432\u0 ...
      self <bzrlib.transport.local.LocalTransport url=file:///D:/srv/ftp/vbk-repo/>
    * File "C:/Python26/lib/site-packages/bzrlib/urlutils.py", line 572, in unescape
      Code fragment:
      Line
      567 # try to encode the UNICODE => ASCII, and then decode
      568 # it into utf-8.
      569 try:
      570 url = str(url)
      571 except UnicodeError, e:
      572 raise errors.InvalidURL(url, 'URL was not a plain ASCII url: %s' % (e,))
      573
      574 unquoted = urllib.unquote(url)
      575 try:
      576 unicode_path = unquoted.decode('utf-8')
      577 except UnicodeError, e:
      Local variables:
      Name Value
      e UnicodeEncodeError('ascii', ...
      url u'trunk/doc/\u0422\u043e\u0440\u0433\u043e\u0432\u043b\u044f\u0410\u0432\u0 ...

File "c:/docume~1/admin/locals~1/temp/easy_install-5uzcpm/Trac-0.12.1-py2.6-win32.egg.tmp/trac/web/main.py", line 511, in _dispatch_request
  dispatcher.dispatch(req)
File "c:/docume~1/admin/locals~1/temp/easy_install-5uzcpm/Trac-0.12.1-py2.6-win32.egg.tmp/trac/web/main.py", line 237, in dispatch
  resp = chosen_handler.process_request(req)
File "c:/docume~1/admin/locals~1/temp/easy_install-5uzcpm/Trac-0.12.1-py2.6-win32.egg.tmp/trac/versioncontrol/web_ui/browser.py", line 371, in process_request
  node = get_existing_node(req, repos, path, rev_or_latest)
File "c:/docume~1/admin/locals~1/temp/easy_install-5uzcpm/Trac-0.12.1-py2.6-win32.egg.tmp/trac/versioncontrol/web_ui/util.py", line 64, in get_existing_node
  return repos.get_node(path, rev)
File "C:/Python26/lib/site-packages/tracbzr-0.4.2-py2.6.egg/tracbzr/backend.py", line 581, in get_node
  branch, relpath = self.get_containing_branch(path)
File "C:/Python26/lib/site-packages/tracbzr-0.4.2-py2.6.egg/tracbzr/backend.py", line 461, in get_containing_branch
  branch, relpath = containing_branch(self.root_transport, location)
File "C:/Python26/lib/site-packages/tracbzr-0.4.2-py2.6.egg/tracbzr/backend.py", line 1343, in containing_branch
  child_transport = transport.clone(path)
File "C:/Python26/lib/site-packages/bzrlib/transport/local.py", line 86, in clone
  abspath = self.abspath(offset)
File "C:/Python26/lib/site-packages/bzrlib/transport/local.py", line 111, in abspath
  self._local_base, urlutils.unescape(relpath)))
File "C:/Python26/lib/site-packages/bzrlib/urlutils.py", line 572, in unescape
  raise errors.InvalidURL(url, 'URL was not a plain ASCII url: %s' % (e,))

User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729)
Trac 0.12.1
Bazaar 2.2.0
Genshi 0.6
mod_wsgi 3.3 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
Pygments 1.3.1
pysqlite 2.4.1
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]
setuptools 0.6c11
SQLite 3.5.9
TracBzr 0.4.2
jQuery 1.4.2

Enabled Plugins:

nevernotifyupdaterplugin 0.0.9 c:\python26\lib\site-packages\nevernotifyupdaterplugin-0.0.9-py2.6.egg
timingandestimationplugin 1.0.6 c:\python26\lib\site-packages\timingandestimationplugin-1.0.6-py2.6.egg
tracaccountmanager 0.2.1dev-r7737 c:\python26\lib\site-packages\tracaccountmanager-0.2.1dev_r7737-py2.6.egg
tracbzr 0.4.2 c:\python26\lib\site-packages\tracbzr-0.4.2-py2.6.egg

Related branches

Revision history for this message
Stas Kalashnikov (halega) wrote :

Trac is working on Microsoft Windows XP Pro SP3.

Revision history for this message
Martin von Gagern (gagern) wrote :

Tricky. I had assumed that passing the path to bzr in its url-encoded form would solve the problem, but it does not. This might even be a bug in bzr, I'm not sure yet.

Changed in trac-bzr:
assignee: nobody → Martin von Gagern (gagern)
importance: Undecided → Medium
milestone: none → 0.4.3
status: New → Triaged
Revision history for this message
Martin von Gagern (gagern) wrote :

OK, I take it that this is a bug in bzr. If '.' is an empty branch, the following command fails with the same error message:

env -i python -c '
from bzrlib import bzrdir, transport;
print bzrdir.BzrDir.open_containing_from_transport(transport.get_transport(".").clone("./t%C3%A4st"))'

the "env -i" is needed to ensure that no locale settings are present. So if the locale is set correctly, things seem to work as they should. That might be an option for a possible workaround: setting the locale appropriately. Will investigate that avenue for trac-bzr.

Nevertheless, it is my understanding that the above approach should only depend on current locale for the part of the path represented in the current file system. Anything below that, i.e. the relpath relative to the branch root and denoting a file inside the (treeless) branch, should be independent from locale settings if possible.

bzrlib.transport.local.LocalTransport.abspath is probably the place where this must be tackled.

Revision history for this message
Martin von Gagern (gagern) wrote :

The attached branch lp:~gagern/trac-bzr/bug675014 in combination with proper locale settings in the environment does seem to work for me. To set the environment for my CGI process, I added the following lines to my apache config:

LoadModule env_module modules/mod_env.so
SetEnv LANG de_DE.utf8

You might need to adjust these to your environment. You might also need to use some other configuration when executing Trac via some interface other than CGI. You might whish to only set LC_CTYPE instead of LANG. Please give it a try.

Revision history for this message
Stas Kalashnikov (halega) wrote :

I installed lp:~gagern/trac-bzr/bug675014 branch and now it works correctly. I can't reproduce the bug. I didn't change any settings in my Apache config (I run trac as wsgi application).

Thanks!

Revision history for this message
QIU Quan (jackqq) wrote :

Just on the way of filing a bug when I found this one.

I'm using Chinese in paths and also experiencing the InvalidURL problem. By applying bzrlib.urlutils.escape() on the path variable on line 581, like below:
              branch, relpath = self.get_containing_branch(bzrlib.urlutils.escape(path))

I managed to work out the problem. However, I'm not sure if it's a proper solution.

Now I pulled your attached branch lp:~gagern/trac-bzr/bug675014. It works like a charm! Thanks.

Revision history for this message
Vincent Ladeuil (vila) wrote :

@mvg: This seems to be a trac-bzr issue, marking the bzr part as invalid. Re-open if you think I'm wrong.

Changed in bzr:
status: New → Invalid
Revision history for this message
Oleg Frantsuzov (franoleg) wrote :

I still get this bug after I installed TracBzr from the lp:~gagern/trac-bzr/bug675014 branch. I have Trac 0.12.2 and Bazaar 2.1.2 (latest available in stable) on Debian squeeze.

Revision history for this message
Martin von Gagern (gagern) wrote :

Sorry for the late reply. Oleg, can you try again with r120 of the lp:~gagern/trac-bzr/bug675014 branch? If things still don't work, have a look at the README. There is a new section "File name encoding" which might help you diagnose the issue and find a solution for it.

Changed in trac-bzr:
status: Triaged → In Progress
Revision history for this message
Oleg Frantsuzov (franoleg) wrote :

Sorry for the delay. I have installed r120 of the bugfix branch, but it didn't help.

The README helped me with the diagnosing part, but not with the solution. FSEncoding is ANSI_X3.4-1968 (ascii) on my installation. Unfortunately, setting LANG to en_US.utf8 didn't seem to help: Trac continues to report ascii as FSEncoding.

I'm using Apache and mod_wsgi; any chance you can direct me to an explanation how can I make Trac change FSEncoding in my setup?

Revision history for this message
Martin Packman (gz) wrote :

Oleg: You probably need to call setlocale in your environment for the LANG setting to be picked up.

I can't find much Trac specific on this, but there was a mod_python bug along these lines:
<http://trac.edgewall.org/ticket/764>

And there's some mod_wsgi documentation on such issues:
<http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Timezone_and_Locale_Settings>

You may need to ask on a mod_wsgi or trac list for further support as your current setup (whether you're running in embedded or daemon mode, and what other code the server is using) will matter here.

Revision history for this message
Martin von Gagern (gagern) wrote :

You might also want to adjust trac-bzr to include os.environ['LANG'] along with the FSEncoding in the system info. You might also want to include locale.nl_langinfo(locale.CODESET). Theoretically the charset information should go from environment to nl_langinfo to FSEncoding. If it isn't in the environment, mod_wsgi config should help. If it is there but not in nl_langinfo, a call to setlocale might help, but I fear that would have to be during python startup, so you might have to patch mod_wsgi. If it is in nl_langinfo but not in FSEncoding, then the call to setlocale might be present somewhere but might happen too late.

Revision history for this message
Martin von Gagern (gagern) wrote :

Oleg: any luck with the above suggestions? I just committed those non-ascii fixes to trunk, so future releases will have them, but I'd feel far better if you could confirm that they do work for you. Or if it does not work, I'd appreciate if you could provide some of the information mentioned in my previous post.

The README now has a section about file name encoding as well, which might be helpful:
http://bazaar.launchpad.net/~trac-bzr-team/trac-bzr/trunk/view/122/README#L290

Changed in trac-bzr:
status: In Progress → Fix Committed
Revision history for this message
Annakan (annakan) wrote :
Download full text (3.8 KiB)

Hello it is me again :) (this joke won't even work in a few weeks but I could not resist ;) )

While doing tests on Question #200255 I added another branch to the repo browser that is called "schéma" with an accentuated letter, old mistake, constant pains (I plan to remove it but it implies changing lots of path, postponing IS the mother of many troubles).

Browsing the repo through this link bring a :
"Trac detected an internal error:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 75: ordinal not in range(128)"

I had previously upgraded the plug-in to the latest trunk branch with "bzr branch lp:trac-bzr".

Her is the complete stack
Python Traceback
Most recent call last:

File "/home/tracuser/tracstbenv/lib/python2.7/site-packages/Trac-0.12.4dev_r0-py2.7.egg/trac/web/main.py", line 522, in _dispatch_request
  dispatcher.dispatch(req)
File "/home/tracuser/tracstbenv/lib/python2.7/site-packages/Trac-0.12.4dev_r0-py2.7.egg/trac/web/main.py", line 243, in dispatch
  resp = chosen_handler.process_request(req)
File "/home/tracuser/tracstbenv/lib/python2.7/site-packages/Trac-0.12.4dev_r0-py2.7.egg/trac/versioncontrol/web_ui/browser.py", line 371, in process_request
  node = get_existing_node(req, repos, path, rev_or_latest)
File "/home/tracuser/tracstbenv/lib/python2.7/site-packages/Trac-0.12.4dev_r0-py2.7.egg/trac/versioncontrol/web_ui/util.py", line 64, in get_existing_node
  return repos.get_node(path, rev)
File "/home/tracuser/tracstbenv/lib/python2.7/site-packages/TracBzr-0.4.2_20120613-py2.7.egg/tracbzr/backend.py", line 625, in get_node
  branch, relpath = self.get_containing_branch(path)
File "/home/tracuser/tracstbenv/lib/python2.7/site-packages/TracBzr-0.4.2_20120613-py2.7.egg/tracbzr/backend.py", line 501, in get_containing_branch
  url, possible_transports=[self.root_transport])
File "/usr/local/lib/python2.7/site-packages/bzrlib/controldir.py", line 732, in open_containing
  return klass.open_containing_from_transport(transport)
File "/usr/local/lib/python2.7/site-packages/bzrlib/controldir.py", line 753, in open_containing_from_transport
  result = klass.open_from_transport(a_transport)
File "/usr/local/lib/python2.7/site-packages/bzrlib/controldir.py", line 716, in open_from_transport
  find_format, transport, redirected)
File "/usr/local/lib/python2.7/site-packages/bzrlib/transport/__init__.py", line 1718, in do_catching_redirections
  return action(transport)
File "/usr/local/lib/python2.7/site-packages/bzrlib/controldir.py", line 704, in find_format
  probers=probers)
File "/usr/local/lib/python2.7/site-packages/bzrlib/controldir.py", line 1149, in find_format
  return prober.probe_transport(transport)
File "/usr/local/lib/python2.7/site-packages/bzrlib/bzrdir.py", line 1250, in probe_transport
  format_string = transport.get_bytes(".bzr/branch-format")
File "/usr/local/lib/python2.7/site-packages/bzrlib/transport/__init__.py", line 623, in get_bytes
  f = self.get(relpath)
File "/usr/local/lib/python2.7/site-packages/bzrlib/transport/local.py", line 166, in get
  return osutils.open_file(path, 'rb')

And the additional infos :
AutocompleteUsers 0.4.2dev-r0
EstimationTools 0.4.5-r0
Extende...

Read more...

Revision history for this message
Martin von Gagern (gagern) wrote :

OK, the original bug was about non-ascii characters in a versioned resource, whereas this latest instance is about a non-ascii branch name.

> SetEnv "LANG fr_FR"

Strange quoting. Perhaps you have to remove those quotes, or only quote the value not the name.

Have you read and followed the section "File name encoding" of the current README?

Since http://bazaar.launchpad.net/~trac-bzr-team/trac-bzr/trunk/revision/116.1.3 the system info page of trac should provide sufficiently privileged users with information about the filesystem encoding as trac sees it. Can you provide that information as well? Unless that setting is fr_FR as well, there is a problem with your environment. The output from the "locale" binary might be helpful, too, to check that a locale called fr_FR is actually installed on your system.

I'm not sure whether mod_wsgi passes environment settings from those SetEnv directives to the python process. I found no box to set environment variables in the mod_wsgi daemob process itself. One hackish workaround might be replacing the python binary inside your virtual environment with a shell script that exports the required variables and then executes the real python binary:

#!/bin/sh
export LANG=fr_FR.utf8
exec path_to/real_python

Revision history for this message
Annakan (annakan) wrote :

Ok I can confirm it is stictly a local issue I'll explain what I did on my other more "serious" issue but to sum it up I installed a completely new VEnv and tried to use fcgi to serve trac.
I was never able to have the python interpreter in the fcgi to pick up the LC_ALL, LANG and such be it with SetEnv the envvar/envvar.d mechanism and such, a phpinfo showed that the variable WERE in the environment but the python executable was not picking them, maybe the fcgi does not pass them and I need to use a special directive but google was confusing on that, I ended up giving up for now, even if I hate not to understand.

Correcting my SetEnv in the wsgi setup worked in the end so SetEnv works for wsgi and I was able to see the FSEncoding= UTF-8 in the about panel of trac.

After this, browsing the "schéma" path worked.

Sorry for wasting your time on this and thanks a lot for your help and support.

Revision history for this message
Martin von Gagern (gagern) wrote :

For mod_fastcgi you'd probably have to use the following config line:
FastCgiConfig -initial-env LANG=fr_FR.utf8
This line without the equals sign and everything that follows it might already be enough, but the above is more likely to work.
See also http://www.fastcgi.com/drupal/node/25#FastCgiConfig
Perhaps I should include this pointer in the documentation.

Revision history for this message
Alexander Belchenko (bialix) wrote :

Is itposiible to backport this fix to 0.3.3? I'm still using 0.3.3 on windows, and run trac as tracd python script directly. I'm not sure about apache configs etc.

Revision history for this message
Alexander Belchenko (bialix) wrote :

@Martin von Gagern: I found that such small change helps:

=== modified file 'tracbzr/backend.py'
--- tracbzr/backend.py 2010-04-10 17:56:06 +0000
+++ tracbzr/backend.py 2012-11-08 09:29:09 +0000
@@ -68,6 +68,7 @@
     osutils,
     revision,
     transport,
+ urlutils,
 )
 import bzrlib.api
 from bzrlib.revision import (
@@ -1337,7 +1338,7 @@

 def containing_branch(transport, path):
- child_transport = transport.clone(path)
+ child_transport = transport.clone(urlutils.escape(path))
     my_bzrdir, relpath = \
         bzrdir.BzrDir.open_containing_from_transport(child_transport)
     return my_bzrdir.open_branch(), relpath

Is it enough, what do you think? Will you accept this patch for merging to 0.3 branch?

Revision history for this message
Alexander Belchenko (bialix) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.