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