diff --git a/lib/roo/spreadsheet.rb b/lib/roo/spreadsheet.rb index 3b4b220d..822d0c8e 100644 --- a/lib/roo/spreadsheet.rb +++ b/lib/roo/spreadsheet.rb @@ -9,7 +9,7 @@ def open(path, options = {}) options[:file_warning] = :ignore ".#{options.delete(:extension)}".gsub(/[.]+/, ".") else - File.extname((path =~ URI::regexp) ? URI.parse(path).path : path) + File.extname((path =~ URI::regexp) ? URI.parse(URI.encode(path)).path : path) end case extension.downcase