diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2017-01-28 06:24:51 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2017-01-28 06:24:51 +0000 |
commit | b2c0ea2c3e150f8ac666cd1ec0a81b943ee131c8 (patch) | |
tree | 619f33677f9d18aa12e9b4ccbfb83e05bb966339 /lib | |
parent | 281bc5c454411e72f6ce934de7cbf1ca5192d35e (diff) | |
download | redmine-b2c0ea2c3e150f8ac666cd1ec0a81b943ee131c8.tar.gz redmine-b2c0ea2c3e150f8ac666cd1ec0a81b943ee131c8.zip |
do not replace all invalid utf8 (#24616)
git-svn-id: http://svn.redmine.org/redmine/trunk@16273 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/codeset_util.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/codeset_util.rb b/lib/redmine/codeset_util.rb index bd4803b70..4f056d54a 100644 --- a/lib/redmine/codeset_util.rb +++ b/lib/redmine/codeset_util.rb @@ -6,7 +6,7 @@ module Redmine return str if str.nil? str.force_encoding('UTF-8') if ! str.valid_encoding? - str = str.encode("US-ASCII", :invalid => :replace, + str = str.encode("UTF-16LE", :invalid => :replace, :undef => :replace, :replace => '?').encode("UTF-8") end str |