Defect #2006

problem accessing svn repository with PATH contains non-english symbols

Added by Roman Kimyaev about 9 years ago. Updated almost 9 years ago.

Status:ClosedStart date:2008-10-08
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:SCM
Target version:0.8
Resolution:Fixed Affected version:0.7.3

Description

Hi,
I have svn repository contains files and 'folders' have both english and non-english(russian) names. There is utf-8 enconding in the settings. Everything well with english named files and 'folders'. But when i trying to get russian named files or 'folder' i see such error in the log:

Processing RepositoriesController#browse (for 10.0.1.47 at 2008-10-07 19:13:21) [GET]
  Session ID: 901453329e4997862b681ccde42fa2b7
  Parameters: {"action"=>"browse", "id"=>"prj", "controller"=>"repositories", "path"=>["╨Ъ╨╛╨╜╨▓╨╡╤А╤В╨░╤Ж╨╕╤П"]}
Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list>
C:/ruby/lib/ruby/1.8/rexml/parsers/treeparser.rb:27:in `parse'
C:/ruby/lib/ruby/1.8/rexml/document.rb:204:in `build'
C:/ruby/lib/ruby/1.8/rexml/document.rb:42:in `initialize'
C:/redmine-0.7/lib/redmine/scm/adapters/subversion_adapter.rb:65:in `new'
C:/redmine-0.7/lib/redmine/scm/adapters/subversion_adapter.rb:65:in `entries'
C:/redmine-0.7/lib/redmine/scm/adapters/abstract_adapter.rb:127:in `call'
C:/redmine-0.7/lib/redmine/scm/adapters/abstract_adapter.rb:127:in `shellout'
C:/redmine-0.7/lib/redmine/scm/adapters/abstract_adapter.rb:125:in `popen'
C:/redmine-0.7/lib/redmine/scm/adapters/abstract_adapter.rb:125:in `shellout'
C:/redmine-0.7/lib/redmine/scm/adapters/subversion_adapter.rb:62:in `entries'
...

I caught invoke shellout(cmd) in the subversion_adapter.rb and saw at the cmd variable.
It contained:

 'svn list --xml "svn://uran/╨Ъ╨╛╨╜╨▓╨╡╤А╤В╨░╤Ж╨╕╤П"@HEAD 2>&1'      

Temporary i solved this problem in the abstract_adapter.rb:

def shellout(cmd, &block)
   logger.debug "Shelling out: #{cmd}" if logger && logger.debug?
   begin
      # IO.popen( cmd, "r+") do |io|
      IO.popen( Iconv.iconv( 'cp1251','utf-8', cmd ).to_s, "r+") do |io|


But I think it's no good

P.S. I think such problem is not for Russian chars in path only. This occur when size( utf-8 char ) > 1 byte
P.P.S.Sorry for my bad English


Related issues

Related to Redmine - Patch #1993: To correct the defect that non-ASCII subversion path can'... Closed 2008-10-06

History

#1 Updated by Roman Kimyaev about 9 years ago

This is the same bug #1993

#2 Updated by Jan Ivar Beddari almost 9 years ago

I had the same problem with Norwegian characters. The patch in #1993 fixed my problem. It seems like this is a legitimate bug .. ? At least we have a solution that works.

#3 Updated by Jean-Philippe Lang almost 9 years ago

  • Category set to SCM
  • Status changed from New to Closed
  • Target version set to 0.8
  • Affected version (unused) set to 0.7.3
  • Resolution set to Fixed
  • Affected version set to 0.7.3

Patch #1993 that should fix this problem was committed in r2004.

Also available in: Atom PDF