HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] AW: german umlauts



* Bernhard Schrader <b.schrader@xxxxxxxx> [100420 05:40]:
> Hi,
> 
> if I change the user for example to "uucp" and commit locale everything is de_DE.UTF-8
> 
> I have tried something that I wanna share with you.
> First I analyzed the E-Mail headers.
> 
> If I send a facsimile with my thunderbird as ISO-8859-15 following stand in the header
> 
> Charset=ISO-8859-15
> Content-Transfer-Encoding: 8Bit
> 
> My Test umlauts look like this
> 
> Ein umlaut das oe - 366 -
> Ein umlaut das ae - 344 -
> Ein umlaut das ue - 374 -
> 
> And if it is printed in our FAX it looks like this
> 
> Ein umlaut das oe -  -
> Ein umlaut das ae -  -
> Ein umlaut das ue -  -
> 
> 
> Then I tried to Encode in UTF-8
> Header:
> 
> Charset=UTF-8
> Content-Transfer-Encoding: 8bit
> 
> Umlauts look like:
> 
> Ein umlaut das oe - ö -
> Ein umlaut das ae - ä -
> Ein umlaut das ue - ü -
> 
> Printed in fax:
> 
> Ein umlaut das oe - ^/ -
> Ein umlaut das ae - ^(strange char like in Word for new line) -
> Ein umlaut das ue - ^... -
> 
> So it doesn't work like it should work.
> 
> After all of that I tried sendfax from the CLI,
> Locale for user root is posix like I told before.
> 
> I made a html file and inserted the above in it.
> 
> Ein umlaut das oe - ö -
> Ein umlaut das ae - ä -
> Ein umlaut das ue - ü -
> 
> After commiting "sendfax -n -d [Faxnumber] foo.php"
> 
> I get something like this:
> 
> Rule:offset 0 ascii = -- failed (unprintable char 0xc3)
> No match
> Foo.php: Can not determine file type
> 
> ("file foo.php" says its an html file)
> 
> I recoded it as following
> 
> Recode u8..l9 < foo.php > foo_iso.php
> 
> Umlauts look like:
> 
> Ein umlaut das oe - 366 -
> Ein umlaut das ae - 344 -
> Ein umlaut das ue - 374 -
> 
> Sendfax ... same error
> 
> Html2ps foo_iso.php foo_iso.ps
> 
> Sendfax worked
> 
> Output on printer
> 
> Ein umlaut das oe - ö -
> Ein umlaut das ae - ä -
> Ein umlaut das ue - ü -
> 
> 
> Well, on the CLI I get the correct output. But on which state I have to look if I want to print the mails correct.
> 
> I think there is somewhere a wrong encoding, but I cant imagine where. :( 
> 
> Hope you have some ideas.
> 
> Greetz
> Bernhard
> 
Bernhard,

The "TextFmt" text->postscript formatting in HylaFAX doesn't support
any character set/encoding stuff.... In fact, I haven't found any
text->postscript conversion stuff that works on more than latin1.  When
I need to convert UTF-8 to postscript, I do this:
	iconv -f UTF-8 -t ISO-8859-15 %i | \
	    a2ps -X ISO-8859-15 -R -PLetter --header=" " --footer= --left-footer= --right-footer= -=mail -1
-g -o %o

You can use that in your typerules and make HylaFAX use this "external"
converter for text->postscript and avoid it's internal TextFmt class.
Of course, that "Assumes" UTF-8 too, and won't handle others... I
theory, you could wrap it in a script that guesses at text encoding and
charset...



-- 
Aidan Van Dyk                                             aidan@xxxxxxxx
Senior Software Developer                          +1 215 825-8700 x8103
iFAX Solutions, Inc.                                http://www.ifax.com/

Attachment: signature.asc
Description: Digital signature




Project hosted by iFAX Solutions