lib/s3sync/S3encoder.rb in cprobert-s3sync-1.3.7 vs lib/s3sync/S3encoder.rb in cprobert-s3sync-1.3.9

- old
+ new

@@ -12,11 +12,11 @@ # (without changing the file itself or requiring a specific version) # It still isn't perfectly robust, i.e. if radical changes are made # to the underlying lib this stuff will need updating. require 'cgi' -require 'iconv' # for UTF-8 conversion +##require 'iconv' # for UTF-8 conversion # thanks to http://www.redhillconsulting.com.au/blogs/simon/archives/000326.html module S3ExtendCGI def self.included(base) base.extend(ClassMethods) @@ -38,10 +38,10 @@ attr_writer :useUTF8InEscape def S3Extend_escape(string) result = string - result = string.encode(@nativeCharacterEncoding, :invalid => :replace, :undef => :replace, :replace => "-") if @useUTF8InEscape + result = string.encode(@nativeCharacterEncoding, :invalid => :replace, :undef => :replace, :replace => "") if @useUTF8InEscape #result = Iconv.iconv("UTF-8", @nativeCharacterEncoding, string).join if @useUTF8InEscape result = S3Extend_escape_orig(result) result.gsub!(/%2f/i, "/") if @exemptSlashesInEscape result.gsub!("+", "%20") if @usePercent20InEscape