--- attachments_helper.rb 2010-03-25 16:01:05.000000000 +0900 +++ /mnt/base02_data/attachments_helper.rb 2010-03-25 15:57:53.764533400 +0900 @@ -27,17 +27,8 @@ render :partial => 'attachments/links', :locals => {:attachments => container.attachments, :options => options} end end - + def to_utf8(str) - return str if /\A[\r\n\t\x20-\x7e]*\Z/n.match(str) # for us-ascii - @encodings ||= Setting.repositories_encodings.split(',').collect(&:strip) - @encodings.each do |encoding| - begin - return Iconv.conv('UTF-8', encoding, str) - rescue Iconv::Failure - # do nothing here and try the next encoding - end - end str end end