By the way, iconv should not be required as I figured out how to add the BOM manually (and that iconv was totally useless for that).
This should be the proper piece of code :
Code:
#!/bin/bash
OUTPUT_FILE='quotes.txt'
SQLITE='./sqlite3.exe'
AWK='awk'
#add the UTF-8 BOM to the generated file
echo -ne '\xEF\xBB\xBF' > $OUTPUT_FILE
$SQLITE Sony_Reader/database/books.db 'select b.author, b.title, a.marked_text FROM annotation a INNER JOIN books b on a.content_id=b._id' | \
$AWK -F '|' '{ print "--------------------\nAuthor: "$1"\nTitle: "$2"\n--------------------\n"$3"\n--------------------" }'| \
unix2dos >> $OUTPUT_FILE