Blob Blame History Raw
--- alexandria-book-collection-manager-0.7.4/lib/alexandria/export_library.rb.csv	2020-01-03 16:24:11.989122168 +0900
+++ alexandria-book-collection-manager-0.7.4/lib/alexandria/export_library.rb	2020-01-03 16:37:23.739363736 +0900
@@ -110,12 +110,12 @@
           io.puts "<TITLE>#{book.title} </TITLE>"
           # put a link to the book's cover. only works on iPod 5G and above(?).
           if File.exist?(cover(book))
-            io.puts '<A HREF="pixmaps/' + book.ident + ".jpg" + '">' + book.title + "</A>"
+            io.puts '<A HREF="pixmaps/' + book.ident + ".jpg" + '">' + book.title.force_encoding('UTF-8') + "</A>"
           else
-            io.puts book.title
+            io.puts book.title.force_encoding('UTF-8')
           end
-          io.puts book.authors.join(", ")
-          io.puts book.edition
+          io.puts book.authors.join(", ").force_encoding('UTF-8')
+          io.puts book.edition.force_encoding('UTF-8')
           io.puts((book.isbn || ""))
           # we need to close the files so the iPod can be ejected/unmounted without us closing Alexandria
           io.close
@@ -379,8 +379,8 @@
           end
         end
         bibtex << "\",\n"
-        bibtex << "title = \"#{latex_escape(book.title)}\",\n"
-        bibtex << "publisher = \"#{latex_escape(book.publisher)}\",\n"
+        bibtex << "title = \"#{latex_escape(book.title.force_encoding('UTF-8'))}\",\n"
+        bibtex << "publisher = \"#{latex_escape(book.publisher.force_encoding('UTF-8'))}\",\n"
         bibtex << "OPTnote = \"#{latex_escape(book.notes)}\",\n" if book.notes && !book.notes.empty?
         # year is a required field in bibtex @BOOK
         bibtex << "year = " + (book.publishing_year || '"n/a"').to_s + "\n"