View Single Post
Old 08-26-2018, 04:49 PM   #39
ubuntero
Junior Member
ubuntero began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jul 2018
Device: PB InkPad3
Sorry, I didn`t clarify properly what I really wanted to achieve.

I wanted my browser to autorecognize encoding, which is finally possible by adding <meta> tag to your code.

Code:
echo "<HTML><HEAD><META CHARSET="UTF-8"></HEAD><BODY><TABLE>"$(sqlite3 --header --html books.db "select Title, Authors, json_extract(Highlight, '$.text') as Text from Books inner join (select OID as BookID, Highlight from Items inner join (select ParentID, Highlight from Items inner join (select ItemID, Val as Highlight from Tags where TagID = 104 and Val <> '{\"text\":\"Bookmark\"}') as Highlights on Highlights.ItemID = OID) as Highlights on Highlights.ParentID = OID) as Highlights on BookID = OID;")"</TABLE></BODY></HTML>" > highlights.html
ubuntero is offline   Reply With Quote