diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-04-14 15:39:00 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-04-14 15:39:00 +0000 |
commit | 04a22fa757a5c0d619b676d0970d0f04ca7d4976 (patch) | |
tree | 3e5bda4500b4806d36f89dd5c2370d44e944db18 /lib/redmine/scm | |
parent | bebf8247a7f8d01040780b4f160455e958af9462 (diff) | |
download | redmine-04a22fa757a5c0d619b676d0970d0f04ca7d4976.tar.gz redmine-04a22fa757a5c0d619b676d0970d0f04ca7d4976.zip |
scm: cvs: convert author encoding with log encoding setting.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5456 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/scm')
-rw-r--r-- | lib/redmine/scm/adapters/cvs_adapter.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb index 059f5cecf..06ab1555f 100644 --- a/lib/redmine/scm/adapters/cvs_adapter.rb +++ b/lib/redmine/scm/adapters/cvs_adapter.rb @@ -239,9 +239,10 @@ module Redmine revision = $1 elsif /^date:\s+(\d+.\d+.\d+\s+\d+:\d+:\d+)/ =~ line date = Time.parse($1) - # TODO: This regexp fails in some non UTF-8 chars on Ruby 1.8. - author = /author: ([^;]+)/.match(line)[1] - file_state = /state: ([^;]+)/.match(line)[1] + line_utf8 = scm_iconv('UTF-8', options[:log_encoding], line) + author_utf8 = /author: ([^;]+)/.match(line_utf8)[1] + author = scm_iconv(options[:log_encoding], 'UTF-8', author_utf8) + file_state = /state: ([^;]+)/.match(line)[1] # TODO: # linechanges only available in CVS.... # maybe a feature our SVN implementation. |