lib/helper.rb in narou-1.5.5 vs lib/helper.rb in narou-1.5.5.1

- old
+ new

@@ -93,10 +93,10 @@ def print_horizontal_rule puts "―" * 35 end def replace_filename_special_chars(str, invalid_replace = false) - result = str.tr("/:*?\"<>|.", "/:*?”〈〉|.").gsub("\\", "¥").gsub("\t", "") + result = str.tr("/:*?\"<>|.", "/:*?”〈〉|.").gsub("\\", "¥").gsub("\t", "").gsub("\n", "") if invalid_replace org_encoding = result.encoding result = result.encode(Encoding::Windows_31J, invalid: :replace, undef: :replace, replace: "_") .encode(org_encoding) end