Operating System - HP-UX
1755691 Members
3695 Online
108837 Solutions
New Discussion юеВ

french character printing

 
Thi Vu
Frequent Advisor

french character printing

Hello everyone,

I have many reports in French that need to print over many network printers (HP printers). I know that by using "iconv" command (ie: iconv -f iso81 -t roma8 filename > filename.X) then do: lp -d printer_name filename.X at the command line will print the reports with the French char. showing OK. However, I want this to print automatically from the print menu so that once the report is created it will then go to the printers. I had tried to modify the script for the printer in /etc/lp/interface/printer_name by adding this command into the script:

requestid=$1 (defined by interface's script)

/usr/bin/iconv -f iso81 -t roma8 $requestid > /var/spool/lp/request/$printer/$requestid

by doing this I figure that when the lpsched invoke the interface program (which is the one I modify above) it will print my modified $requestid. However, this does not work. Can someone point where I went wrong?

Thank you in advance for all your help.

Thi
3 REPLIES 3
Steve Steel
Honored Contributor

Re: french character printing

PROBLEM
A file containing French characters needs to be printed. The standard lp command does not give the correct output.
RESOLUTION
The printers are defaulting to a character set that does not contain the special accented characters. Reference the documentation for the printer in question for specifics on which character sets the printer supports.
HP LaserJets

Many times printing in the extended character set range results in the characters coming out wrong. An e with a grave accent may come out as an upper-case O with an acute accent, etc. This is caused by a mis- match in the character sets.

HP LaserJet printers have multiple "typefaces" available. The printer, like the OS assumes Roman8 encodings by default. This behavior can be changed with the lp command.

lp -d -ocs0N

The -ocs0N options tells the LaserJet to use a different character set. 0N represents ISO 8859-1. The printer manual gives details on available typefaces.

Line/Impace Printers (i.e. HP2562C)

For a line printer, iconv would have to be used to convert the file to be printed:

/usr/bin/iconv -f iso8859_1 -t roman8 >

lp -d -ocsOF

----------------------------------------------
Or for the lasers

In order to get the PC-8 french characters and Us English characters always
correct printed he need to modify the printer interface script (in
/var/spool/lp/interface/model.orig) in the follow way:

Change from:

case "$charset" in
def);;
*) echo "\033(${charset}\c";;

to:

case "$charset" in
def) echo "\033(19U\c";;
*) echo "\033(${charset}\c";;


----------------------------------------------
For line printers


1) /usr/bin/iconv -f iso8859_1 -t roman8 french_jose > french_fix
2) lp -dprinter -ocs0F french_fix

Or

Change print menu to


/usr/bin/iconv -f iso8859_1 -t roman8 french_jose | lp -dprinter -ocs0F


If you want truly to understand something, try to change it. (Kurt Lewin)
Thi Vu
Frequent Advisor

Re: french character printing

Sorry it takes so long to reply to this message but I'm following all the advices below and it stills print gobbery gob. I went and dig further and found that all the HP laserjet printers are now set their SYMBOL SET=PC-8 not ROMAN-8. Thus I'm back at square one. I'm now looking at different approach by re-setting the SYMBOL SET=ROMAN-8. If you have knowledge of this I thank you.
Carlos Fernandez Riera
Honored Contributor

Re: french character printing


Good idea, but i think it is much simple:

1- $request is id of request. Use $file .
Do not redirect to any file. Lp use standard output, unless you are using jetdirect software.

To see what interface are doing add
set -x 2> /tmp/printer_trace.

Print a file and then see that file.

2- If you need to change character set of printer online you must add
echo .
search < scape squence> for french on printer's manual.


unsupported