Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi
Env Debian 9.9
kernel 4.9.0-9-686-pae
cups-pdf 2.6.1-22
Prb print to cups-pdf with lp command does not show euro sign ..
Description
i edit input-file with vi, inserting Euro sign unicode character
20ac ...the euro sign displays correctly...
the i issue "lp input-file" and the resulting input-file.pdf does not show the euro sign ,it instead display small box ...
i read this document https://lists.cups.org/pipermail/cup...er/045577.html
it seems lp support only utf8
my locale setting are
_________________________________
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE=it_IT@euro
LC_NUMERIC=it_IT@euro
LC_TIME=it_IT@euro
LC_COLLATE=it_IT@euro
LC_MONETARY=it_IT@euro
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=it_IT@euro
LC_NAME=it_IT@euro
LC_ADDRESS=it_IT@euro
LC_TELEPHONE=it_IT@euro
LC_MEASUREMENT=it_IT@euro
LC_IDENTIFICATION=it_IT@euro
_________________________________
it is possible to get Euro printed with lp or other print programs to cups-pdf ?
Any help will be appreciated
thanks in advance
Maurizio
hi
Thanks for the answer
I installed Debian Linux with us english language
because
English is supported world wide so if i have errors or problem customizion, serching google for a message written in english grant me support worldwide
Otherwise searching for a message written in italian limit the possibility to find a solution ..
Also this site is written in english ..if i post here error messages in italian or configuration panels wirttten in italian ,then no one will help me
So at installation time i choose to install us english utf8 and add also locale
it_IT@euro ...
here the locale -a output
_______________________________
C
C.UTF-8
en_US.utf8
it_IT@euro
it_IT.iso885915@euro
POSIX
_______________________________
if i issue the date command it correctly displays in italian format
i see you use de_DE.UTF-8 ,i installed linux on this machine some years ago ,so i do not remeber if a it_IT.UTF-8 was available ...
the problem is limited to pdf creation by lp command directed to cups-pdf ...i have not othe printer installed ...
problam can be easy recreated editing a file with vi and ctrl-shift-u 20ac enter ..it correctly create euro sign ...
i see you are from germany ...if using de_DE.UTF-8 fix the poroblem then i will inform how to add this locale ...
Hi i install it_IT.utf8 with dpkg-reconfigure
i modify /etc/default/locale ..with it_IT.utf8
and i cannot see anymore euro sign with vi editor
also adding again it with ctrl-shfit-u 20ac does not display the character ...
instead it display a box
reboot does not change how behave
so i returned with my original /etc/default/locale
in this way i can see euro sign with vi editor
your can recreate problem with
echo '€' > euro
lp euro to the cups-pdf printer
Which includes the Eurosign! You problem is evidently that vi is not giving the correct code — being blissfully ignorant of vi, I cant help with that. But if you use an English language locale, you can still have your Eurosign. Firstly, use a British locale, not an American one — that way you get A4 paper, the metric system, correctly-displayed dates, etc. For the keyboard, the British one has € on AltGr 4, while the US one uses AltGr 5.
Hi
first of all thank for the answers ...
i entered euro sign with "ctrl-shift-u 20ac enter"
vi shows euro sign correctly also other editors like leafpad shows euro sign correctly
i create a small file with "echo" command containing a sample character set
'01234567890 ABCDEFGKJHILMNOPQRSTUVWXYZ €$£'
i switch to hex edit and the euro sign is hex'a4'
i will run dpkg-reconfigure locale and add english utf-8
then i commit an error because i assume it_IT.utf8 from what locale -a shows
i will try with IT-utf8
this is the output of pdffonts
bong@debian:~/PDF$ pdffonts char.pdf
________________________________________________
name Type Encoding emb sub uni object ID
none Type 3 Custom yes no yes 18 0
_______________________________________________
Hi
i changed locale to
___________________________________-
LANG=en_US.UTF-8
LANGUAGE="en_US:en"
LC_MONETARY="it_IT.utf-8"
LC_TIME="it_IT.utf-8"
LC_MEASUREMENT="it_IT.utf-8"
LC_NUMERIC="it_IT.utf-8"
LC_PAPER="it_IT.utf-8"
LC_ADDRESS="it_IT.utf-8"
LC_TELEPHONE="it_IT.utf-8"
LC_NAME="it_IT.utf-8"
LC_IDENTIFICATION="it_IT.utf-8"
LC_COLLATE="it_IT.utf-8"
LC_CTYPE="it_IT.utf-8"
___________________________________
if i edit "char" file i find
01234567890 ABCDEFGKJHILMNOPQRSTUVWXYZ ¤$£
previously i see
01234567890 ABCDEFGKJHILMNOPQRSTUVWXYZ €$£
the hex value of '€' or '¤' is always 'a4'
looking at ASCII to Hex table 'a4' is '¤'
IMHO it seems cups-pdf prints ascii character and not unicode conversion
next i will try to change form "US utf-8" to "en utf-8" and provide a feeedback
hi
setting locale to
LANG=en_GB.UTF-8
LANGUAGE="en_GB:en"
and then opening char file with vi or other editors shows the little box instead of euro sign ...
i returned using my old /etc/default/locale settings
i had no problems...all works well ---the only problem is cups pdf creation
i call "lp" with a my pgm that create an output report with a lot of euro sign
this damned character conversions causes me a lot of problem also with windows .....
going in hex edit in the file it shows 'a4' and cups pdf prints the ASCII 'a4' symbol
the little box ...
something goes wrong during lp processing or pdf creation by cups-pdf
Maurizio
Although there are many variables that might be causing your problem as a frame of reference I am using
debian 10
cups-pdf version 3.0.1
Being in the US my locale is LANG=en_US.UTF-8
I can insert a Euro sign character in vi, gedit or nano text editors and I can print successfully using cups-pdf printer.
Are you are running a desktop? If so try a GUI editor and then select print to file instead of the cups-pdf printer. If it works then maybe something is wrong with cups-pdf otherwise it might be how your locale is configured.
Look at the first line in the /etc/cups/cups-pdf.conf file which should contain the version number.
Hi Michael
thanks for the answer
i'm using debian 9.9 lxde desktop
following your suggestion
i opened "char" file with leafpad (lxde default text editor)
it correctly display the content "€$£"
i choose print to file and it creates an output.pdf that correctly display the Euro sign and off course the other currency sign .
with the "char" file still opened with leafpad i choose to print to pdf and it
correctly creates a pdf file with euro sign
may be the problem in "lp" command ?
my cups-pdf version is 2.6.1
to further diagnose i opened "char" file with vim and execute
:hardcopy > char.ps
then
ps2pdf char.ps
it creates a char.pdf that contain the euro sign
then i issue
enscript -o char.ps char
then
ps2pdf char.ps
it creates a char.pdf that does not contain euro but instead a box like "lp char" do
now here in Italy is late...tomorrow i will return working on ...
have a nice day
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.