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.
HTML
vi /etc/hylafax/faxmail/text/html
#!/bin/bash
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
#!/bin/sh
/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
filter.pl
#!/usr/bin/perl
# Read from the standard input
@text=;
$size=@text;
# Count the number of "showpage"
$count=0;
for($i=0;$i<=$size;$i++){if($text[$i] =~ /showpage/){$count++;}}
# Discard the last line that contain "showpage"
$num=1;
for($i=0;$i<=$size;$i++){
if($text[$i] =~ /showpage/){
if($num!=$count){$num++;}
else{$text[$i]=~s/showpage//g;}
}
print $text[$i];
}
2 replies on “Hylafax/FaxMail with unicode encoding”
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!
Hey, I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say GREAT blog!…..I”ll be checking in on a regularly now….Keep up the good work! :)
surface encounters macomb