プロジェクト

全般

プロフィール

Vote #63967

完了

problem accessing svn repository with PATH contains non-english symbols

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
SCM_3
対象バージョン:
開始日:
2008/10/08
期日:
進捗率:

0%

予定工数:
category_id:
3
version_id:
2
issue_org_id:
2006
author_id:
2331
assigned_to_id:
0
comments:
3
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
5
ステータス-->[Closed]

説明

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: #
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


journals

This is the same bug #1993
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
Patch #1993 that should fix this problem was committed in r2004.
--------------------------------------------------------------------------------


related_issues

relates,Closed,1993,To correct the defect that non-ASCII subversion path can't be displayed(on windows)

Admin Redmine さんが3年以上前に更新

  • カテゴリSCM_3 にセット
  • 対象バージョン0.8_2 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0