From b1a43539715f9860d5f4d14a4976fe4d6d5c0a9b Mon Sep 17 00:00:00 2001 From: Admin Date: Sun, 4 Dec 2022 23:15:46 -0500 Subject: Convert text encoding in html2md --- html2md.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'html2md.rb') diff --git a/html2md.rb b/html2md.rb index 4bbdb39..a5aca09 100755 --- a/html2md.rb +++ b/html2md.rb @@ -16,7 +16,7 @@ end filename = ARGV[0] file_no_ext = File.basename(filename, File.extname(filename)) -content = File.read(filename).encode('UTF-8', invalid: :replace, undef: :replace) +content = File.read(filename).encode('UTF-8', 'iso-8859-1', invalid: :replace, undef: :replace) doc = Nokogiri.parse(content) title = doc.title -- cgit v1.2.3