Hi Volks,
i am using slacko 5.7
My locale is "de_DE.UTF-8"
but cups pdf-writer using "de.UTF-8" ??
How can this be?
cups pdf-writer use other locale ??
- HoerMirAuf
- Posts: 255
- Joined: Tue 22 Jan 2008, 12:11
- Location: Würzburg
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
cups pdf-writer use other locale ??
Hi neighbour,
CUPS uses the language of the browser, see image.
Chrome does automatically use user's LANG
For seamonkey and firefox there is a HOWTO-localize-mozilla.html somewhere....
Hope that help
You might also visit me in Eußenheim
CUPS uses the language of the browser, see image.
Chrome does automatically use user's LANG
For seamonkey and firefox there is a HOWTO-localize-mozilla.html somewhere....
Hope that help
You might also visit me in Eußenheim
- Attachments
-
- Fellschreiben_2015-04-08_201539.png
- (24.31 KiB) Downloaded 357 times
- HoerMirAuf
- Posts: 255
- Joined: Tue 22 Jan 2008, 12:11
- Location: Würzburg
hey neighbour
Thank you very much. Ahhh the locale of the Browser.
Ok, thanks. Found a solution independently from the Browser locale:
delete the example line from /etc/profile
and edit the /usr/lib/cups/backend/pdf-writer#this line gets edited by chooselocale script...
# w004 going back to non-utf8... 101120 back to utf8... 101121 off again...
#110409 change .utf8 to .UTF-8 ...
#LANG=en_US.UTF-8
LANG=de_DE.UTF-8
export LANG
and all went wellUSERHOME=$(grep "^$2" /etc/passwd | cut -d: -f6)
LANGUAGE=$(cat /etc/profile | grep LANG= | cut -c 6-)
# Preselect save folder
PRESELECT="/root/my-documents"
# maybe needed by Xdialog
export PATH=$PATH:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R7/bin
export DISPLAY=":0.0"
export LANG="$LANGUAGE"
export LC_ALL="$LANGUAGE"
export XAUTHORITY=$USERHOME/.Xauthority
PDFNAME=$3".pdf"
[ ${PDFNAME:0:1} != "/" ] && PDFNAME=$PRESELECT/$PDFNAME
(the blue signs is to set a save folder preselection)
Jepp, wenn ich demnächst man in die Richtung komme, sag ich Dir bescheid
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
pdf-writer
found total different pdf-writer
in Quirky7.0.2:
in slacko5.7:#./pdf-writer "hello world"
^C
#
I am confused.
in Quirky7.0.2:
Code: Select all
#./pdf-writer "hello world"
Usage: ./pdf-writer job-id user title copies options [file]
#
^C
#
I am confused.
- Attachments
-
- Fellschreiben_2015-04-09_110842.png
- (22.52 KiB) Downloaded 524 times
Re: pdf-writer
First of all, pdf-writer is a CUPS backend. It is not designed to work as a command-line program. It is used in the Print dialog of an application program like your word processor where it is identified as CUPS-PDF.L18L wrote:I am confused.
There are two versions of pdf-writer. The original version (which is probably in Quirky) had some bugs involving the hostname. So I wrote a much simpler Puppy-specific version. That one is now included in recent Puppies. It also works with non-root users like spot, which IIRC the old one would not.
Unfortunately, I removed the code that handles language because I wasn't sure how it worked. HoerMirAuf has now shown how to fix this.
In any case, pdf-writer is a legacy program. In modern Puppies, your better choice to make a PDF is by using Print > Print to File.
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Re: pdf-writer
rcrsn51,
many thanks, you have made it very clear now.
I had missed pdf-writer before in Fatdog (a modern distro), see also http://murga-linux.com/puppy/viewtopic.php?t=97840.
HoerMirAuf,
if you change
LANGUAGE=$(cat /etc/profile | grep LANG= | cut -c 6-)
to
LANGUAGE=$(cat /etc/profile | grep ^LANG= | cut -c 6-)
then there is no need to delete that line in /etc/profile.
--
edit
or
LANGUAGE=$(grep ^LANG= /etc/profile | cut -c 6-)
many thanks, you have made it very clear now.
I had missed pdf-writer before in Fatdog (a modern distro), see also http://murga-linux.com/puppy/viewtopic.php?t=97840.
HoerMirAuf,
if you change
LANGUAGE=$(cat /etc/profile | grep LANG= | cut -c 6-)
to
LANGUAGE=$(cat /etc/profile | grep ^LANG= | cut -c 6-)
then there is no need to delete that line in /etc/profile.
--
edit
or
LANGUAGE=$(grep ^LANG= /etc/profile | cut -c 6-)
Or
Code: Select all
LANGUAGE=$(grep ^LANG= /etc/profile | cut -c 6-)
[ -z "$LANGUAGE" ] && LANGUAGE="C"
- HoerMirAuf
- Posts: 255
- Joined: Tue 22 Jan 2008, 12:11
- Location: Würzburg