Da lese ich heraus:macsys schrieb:Jedoch geht der Job hinterher doch über die q von cups (aber auch nicht grafisch!!).Gut wenn die Druckerqueue gestopt wurde und das Programm drucken will, entsteht in den logs von cups der Inhalt ohne Umlaute.
Was dann passiert ist wird nicht verraten, sondern nur die Schlussfolgerung die wir daraus gezogen haben!macsys schrieb:Weil ich das schon getestet hab. Mit dem Serversupport aus Berlin.Er hat ein Job gestartet und ich hab die cups der Clients vorher gestoppt.
Nö, die drucken Postscript, das hat nichts mit Grafik zu tun.macsys schrieb:Und, da OpenOffice oder sonstige KDE,GNOME etc Texteditor alle grafisch drucken, und es von da aus ja funktioniert.
Das hängt davon ab wie man druckt, per Drucksystem lp Dateiname oder direkt auf das Gerät cat Dateiname > /dev/lp0macsys schrieb:Warum druckt der Drucker Datein im UTF-8 mit Umlaute und warum nicht im ISO-8859 ?
Ich denke du verstehst immer noch nicht den Unterschied zwischen drucken über Cups und ein Datei Byte für Byte auf der Druckerschnittstelle ausgeben.macsys schrieb:Oder sehe ich das falsch ? ;oP
Ein Blick ins Druckerhandbuch dürfte zeigen das der Drucker nicht weiß was utf8 ist.macsys schrieb:ps. und wenn die bash,root-shell, user-shell doch auf "de_DE.UTF-8" steht warum funktioniert dann die echo ausgabe der umlaute nicht ?
Dann scheint er definitiv mit CUPS zu drucken. Mach eine Sicherheitskopie vom ppd-File (/etc/cups/ppd/Druckername.ppd) und entferne im Original die Zeilemacsys schrieb:Und genau so sah es auch aus, wenn das Tool die Ausgabe machen sollte und er Drucker gestopt war.
#!/bin/sh
#
# altes logfile löschen
# echo "" > /tmp/myfilter.log
# echo "Anzahl Parameter: "$# >> /tmp/myfilter.log
# echo "Parameter: "$* >> /tmp/myfilter.log
#
# Parameter 6 ist der Dateiname der Druckdatei
# Mal schauen welche Kodierung die Textdatei benutzt
FILE_ENCODING=`/usr/bin/file -b --mime-encoding $6`
#
#
DIRECT_PRINTING=no
[ $FILE_ENCODING = us-ascii ] && DIRECT_PRINTING=yes
[ $FILE_ENCODING = utf-8 ] && DIRECT_PRINTING=yes
#
#
# echo "Die Auswertung ergibt DIRECT_PRINTING="$DIRECT_PRINTING >> /tmp/myfilter.log
# DIRECT_PRINTING=yes
#
#
PIPE_FILTER_PARAMETER="$1 $2 $3 $4 $5 -"
FILTER_PATH="/usr/lib/cups/filter"
# echo "die Parameter für pipe-Filter " $PIPE_FILTER_PARAMETER >> /tmp/myfilter.log
#
#
if [ $DIRECT_PRINTING = yes ]
then
# Textdatei ist ASCII oder UTF-8
# echo "drucken über normales Filterkommando" >> /tmp/myfilter.log
$FILTER_PATH/texttops $* | \
$FILTER_PATH/pstops $PIPE_FILTER_PARAMETER | \
$FILTER_PATH/foomatic-rip $PIPE_FILTER_PARAMETER
else
# Textdatei ist kein ASCII- oder UTF-Code --> nach utf-8 umwandeln
# echo "vor dem Drucken nach utf8 konvertieren" >> /tmp/myfilter.log
iconv -cs -f $FILE_ENCODING -t utf-8 $6 | \
$FILTER_PATH/texttops $PIPE_FILTER_PARAMETER | \
$FILTER_PATH/pstops $PIPE_FILTER_PARAMETER | \
$FILTER_PATH/foomatic-rip $PIPE_FILTER_PARAMETER
fi
...
*cupsManualCopies: True
*cupsModelNumber: 2
*cupsFilter: "text/plain 0 myfilter"
*cupsFilter: "application/vnd.cups-postscript 0 foomatic-rip"
*%pprRIP: foomatic-rip other
*ModelName: "Epson LQ-570+"
...
#!/bin/sh
#
# altes logfile löschen
# echo "" > /tmp/myfilter.log
# echo "Anzahl Parameter: "$# >> /tmp/myfilter.log
# echo "Parameter: "$* >> /tmp/myfilter.log
#
# Parameter 6 ist der Dateiname der Druckdatei
# Mal schauen welche Kodierung die Tex5datei benutzt
FILE_ENCODING=`/usr/bin/file -b --mime-encoding $6`
#
#
DIRECT_PRINTING=no
[ $FILE_ENCODING = us-ascii ] && DIRECT_PRINTING=yes
[ $FILE_ENCODING = utf-8 ] && DIRECT_PRINTING=yes
#
#
# echo "Die Auswertung ergibt DIRECT_PRINTING="$DIRECT_PRINTING >> /tmp/myfilter.log
# DIRECT_PRINTING=yes
#
#
FILTER_PATH="/usr/lib/cups/filter"
# echo "die Parameter für pipe-Filter " $PIPE_FILTER_PARAMETER >> /tmp/myfilter.log
#
#
if [ $DIRECT_PRINTING = yes ]
then
# Textdatei ist ASCII oder UTF-8
# echo "drucken über normales Filterkommando" >> /tmp/myfilter.log
$FILTER_PATH/texttops "$1" "$2" "$3" "$4" "$5" "$6" | \
$FILTER_PATH/pstops "$1" "$2" "$3" "$4" "$5" | \
$FILTER_PATH/foomatic-rip "$1" "$2" "$3" "$4" "$5"
else
# Textdatei ist kein ASCII- oder UTF-Code --> nach utf-8 umwandeln
echo "vor dem Drucken nach utf8 konvertieren" >> /tmp/myfilter.log
/usr/bin/iconv -cs -f $FILE_ENCODING -t utf-8 $6 | \
$FILTER_PATH/texttops "$1" "$2" "$3" "$4" "$5" | \
$FILTER_PATH/pstops "$1" "$2" "$3" "$4" "$5" | \
$FILTER_PATH/foomatic-rip "$1" "$2" "$3" "$4" "$5"
fi
Sind das denn identische Systeme? Du darfst das nicht einfach an cups festmachen, der eine oder andere Druckfilter greift vielleicht auf ein externes Tool zu, das seine eigene Vorstellung von der Codierung eines Textes hat. Deshalb war mein Ansatz mit einen eigenen Druckfilter die Textcodierung zu ermitteln und falls erforderlich (nicht ASCII oder UTF8) nach UTF8 zu konvertieren.macsys schrieb:Was ich jetzt nur noch komisch finde. Beim Server der auch cups 1.2.8 drauf hat, funktionieren die gleichen Einstellungen nicht.
I [01/Apr/2010:00:13:57 +0200] Saving subscriptions.conf...
I [01/Apr/2010:00:13:57 +0200] [Job 61] Started filter /usr/lib/cups/filter/texttops (PID 26286)
I [01/Apr/2010:00:13:57 +0200] [Job 61] Started filter /usr/lib/cups/filter/pstops (PID 26287)
I [01/Apr/2010:00:13:57 +0200] [Job 61] [i]Started filter[/i] /usr/lib/cups/filter/foomatic-rip (PID 26288)
I [01/Apr/2010:00:13:57 +0200] [Job 61] Started backend /usr/lib/cups/backend/serial (PID 26289)
I [01/Apr/2010:00:13:57 +0200] Saving subscriptions.conf...