summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-01-18 16:16:23 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-01-18 16:16:23 +0000
commit9915962356ce4bb218ffce55a6120a5d72eb2d08 (patch)
tree8bbdb31e29a1989deed241eb8c1ee3d91eeb7a58 /lib
parent6cc1f2be5439c177583c2c45ae7aebdc8d056895 (diff)
downloadredmine-9915962356ce4bb218ffce55a6120a5d72eb2d08.tar.gz
redmine-9915962356ce4bb218ffce55a6120a5d72eb2d08.zip
Make sure that #scm_iconv returns a string with the target encoding (#14534).
filechanges.find_by_revision_and_path fails with SQLite if arguments are not UTF-8 encoded. git-svn-id: http://svn.redmine.org/redmine/trunk@13902 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/scm/adapters/abstract_adapter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/scm/adapters/abstract_adapter.rb b/lib/redmine/scm/adapters/abstract_adapter.rb
index 1d10abb16..98683b015 100644
--- a/lib/redmine/scm/adapters/abstract_adapter.rb
+++ b/lib/redmine/scm/adapters/abstract_adapter.rb
@@ -283,7 +283,7 @@ module Redmine
def scm_iconv(to, from, str)
return nil if str.nil?
- return str if to == from
+ return str if to == from && str.encoding.to_s == from
str.force_encoding(from)
begin
str.encode(to)