Peter Dyballa
Peter_Dybal****@Web*****
Thu Jan 5 22:05:10 JST 2006
Hello! I was looking a bit closer on that programme to find out why it failed for so many of my text files. And the answer is: it can only handle MacRoman plain text input! Brain damaged® is an exquisite trade mark. OK, it's really not easy to distinguish between the hundred or more 7 and 8 bit text encodings, but UTF-8 is a very fine input encoding which probably (I actually have no proof for this) has every 7 or 8 bit encoding incorporated as some subset. So it is a promising text input format. Should we create some bug reports that convert cannot convert ISO Latin or UTF-8 encoded texts? We must mention then the Apple Scripts / Library/Scripts/Printing\ Scripts/Convert\ To\ PDF.scpt /Library/ Scripts/Printing\ Scripts/Convert\ To\ PostScript.scpt as sources ... One work-around would be to retrieve from Emacs the buffer's or selection's text encoding and use iconv in a *lossy* way to convert to MacRoman: iconv -c -f «from actual encoding» -t MACROMAN «buffer or selection» > /tmp/`id -u`/tmp.out /System/Library/Printers/Libraries/convert -f /tmp/`id -u`/tmp.out - i text/plain -j application/pdf -P «path to PPD file» | lpr [-P«set default printer»] rm /tmp/`id -u`/tmp.out iconv *has* to work lossy, otherwise it would not produce any output. iconv has to be lossy because MacRoman contains so many useless mathematical characters, quotation and diacritical marks, that you lose anyway some characters when coming from ISO Latin encodings. The other and better work-around is to htmlize in Emacs first and then invoke convert (the Aquamacs Emacs way): /System/Library/Printers/Libraries/convert -f /tmp/`id -u`/ htmlize.out -i text/html -j application/pdf -P «path to PPD file» | lpr [-P«set default printer»] rm tmp/`id -u`/htmlize.out (A bit weird is that convert seems to fail when the file names are not enclosed inside double quotation marks. Anyone else found that?) I'm again (still!) astonished how well htmlize.el works! Is there really any reason *not* to make HTML the standard output format before sending it to the printer? (It might be worth to have a personal style sheet made up from some user specific system and Emacs defaults like font and font size, font colours, background ... and, damned, it's too early to write: next year!) Anyway: anyone experienced in MS Losedows?! Before I die I wish to get experienced and my own brain damaged. -- Greetings Pete "Email is a wonderful thing for people whose role in life is to be on top of things. But not for me; my role is to be on the bottom of things. What I do takes long hours of studying and uninterruptible concentration." -Donald Knuth