[Pkg-cups-devel] experiment
Roger Leigh
rleigh at whinlatter.ukfsn.org
Sun Jul 15 22:04:53 UTC 2007
On Thu, May 31, 2007 at 03:12:19AM +0800, jidanni at jidanni.org wrote:
> >the experiment that Roger recommended?
>
> I believe I need one liners I can send to /bin/sh and send you the
> output of. Nothing more complex. Note that I have no longer paper
> printers or send faxes, so I don't often try to make postscript output.
I'll try and suggest something to try here. Note that a one-liner isn't
sufficient, however. We also need to know what happens *when CUPS
itself* trys to run the filter, since CUPS sets up a very specific
environment and command-line options for it. If you try the
LogLevel=debug I suggested, you would see *exactly* what environment
and options CUPS is using.
That said, here's how I suggest you test it on the command-line:
1) Create some UTF-8 text. If you don't already have any (and this
is useful for comparison in any case), try:
% man 7 groff_char -Tps > /tmp/testutf8-direct.ps
% man 7 groff_char -Tutf8 > /tmp/testutf8
2) Run the texttops filter on the text:
% CHARSET=utf-8 CONTENT_TYPE=text/plain CUPS_DATADIR=/usr/share/cups
CUPS_SERVERROOT=/etc/cups DEVICE_URI=file:///tmp/test
FINAL_CONTENT_TYPE=application/vnd.cups-postscript LANG=en
PRINTER=test PPD=/etc/cups/ppd/fake.ppd RIP_CACHE=8192
SOFTWARE=CUPS/1.2 TZ=GMT USER=rleigh /usr/lib/cups/filter/texttops 1
rleigh myfile 1 "" </tmp/testutf8 >/tmp/testutf8.ps
2>/tmp/testutf8.log
This can be simplified to
% CHARSET=utf-8 /usr/lib/cups/filter/texttops 1 rleigh myfile 1 ""
</tmp/testutf8 >/tmp/testutf8.ps 2>/tmp/testutf8.log
3) Check /tmp/testutf8.log for errors or messages
4) Look at the generated /tmp/testutf8.ps
5) Compare with /tmp/testutf8-direct.ps. I notice some missing
symbols, indicating that the filter isn't doing a perfect job.
6) To test your date problem:
% LANG=zh_TW.utf8 LC_CTYPE=zh_TW.utf8 date
日 7月 15 23:00:59 BST 2007
% CHARSET=utf-8 CONTENT_TYPE=text/plain CUPS_DATADIR=/usr/share/cups
CUPS_SERVERROOT=/etc/cups DEVICE_URI=file:///tmp/test
FINAL_CONTENT_TYPE=application/vnd.cups-postscript LANG=zh_TW.utf8
LC_CTYPE=zh_TW.utf8 PRINTER=test PPD=/etc/cups/ppd/fake.ppd
RIP_CACHE=8192 SOFTWARE=CUPS/1.2 TZ=GMT USER=rleigh date|
/usr/lib/cups/filter/texttops 1 rleigh myfile 1 ""
>/tmp/testutf8date.ps 2>/tmp/testutf8date.log
7) Check the generated /tmp/testutf8date.ps
I see the Hangul(?) glyphs missing in the file.
Summary: It would be great if you could try this yourself, but I think
that the texttops filter only has partial support for UCS.
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-cups-devel/attachments/20070715/1418ea5a/attachment.pgp
More information about the Pkg-cups-devel
mailing list