Hylafax/FaxMail with unicode encoding

It is pretty hard to get unicode works with fax ..
here are some scripts that i used to get the unicode done for incoming html/text faxes.

vi /etc/hylafax/faxmail/text/html
cp -pf $1 /tmp/email.html
/usr/bin/lynx -dump -display_charset=utf-8 /tmp/email.html > /tmp/html_txt
/usr/bin/uniprint -font /etc/hylafax/faxmail/Cyberbit.ttf -in /tmp/html_txt -out /tmp/html_txt.uni
cat /tmp/html_txt.uni|/etc/hylafax/faxmail/filter.pl
rm /tmp/email.html
rm /tmp/html_txt
rm /tmp/html_txt.uni

plain text

vi /etc/hylafax/faxmail/text/plain
/usr/bin/uniprint -font /etc/hylafax/faxmail/Cyberbit.ttf -in $1 -out /tmp/plain_txt
# echo " "
# echo "showpage"
cat /tmp/plain_txt | /etc/hylafax/faxmail/filter.pl
$rm /tmp/plain_txt

# Read from the standard input
# Count the number of "showpage"
for($i=0;$i<=$size;$i++){if($text[$i] =~ /showpage/){$count++;}}
# Discard the last line that contain "showpage"
if($text[$i] =~ /showpage/){
print $text[$i];

2 thoughts on “Hylafax/FaxMail with unicode encoding”

  1. Hey, I found your blog while searching on Google your post looks very interesting for me. I will add a backlink and bookmark your site. Keep up the good work!

Leave a Reply

Your email address will not be published. Required fields are marked *