Operating System - HP-UX
1760571 Members
3199 Online
108894 Solutions
New Discussion юеВ

Re: Not the right context (special characters) on the output

 
SOLVED
Go to solution
E. Vodegel
Occasional Advisor

Not the right context (special characters) on the output

Hi,

I have a HP Laserjet 4Si on the network installed with webadmin on HP-ux 11.0. This is my default printer.

I have made a file with the following context:
????????}~????

When I want to print(lp filename) I've got something else:
??????A}~yS

What do I have to do to get the right output (special characters)?

Thanks,
Erwin
2 REPLIES 2
Steve Steel
Honored Contributor
Solution

Re: Not the right context (special characters) on the output

Hi


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


I am printing via JetAdmin to my LaserJet. I usually print US English
text, and sometimes I need to print special French characters from my
Oracle database.

How can I set the default in the modelscript so that I can always print
French and the US-English text?


CONFIGURATION
Operating System - HP-UX
Subsystem - Printing

RESOLUTION
Modify the printer interface script (in
/var/spool/lp/interface/model.orig) to always print the PC-8 French
characters and US English characters:

Change:

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

To:

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


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
E. Vodegel
Occasional Advisor

Re: Not the right context (special characters) on the output

I have done what Steven hast told me to do:

Change:

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

To:

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

And it worked fine. Thanks...