Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to print 7-bit chars?

Status
Not open for further replies.

Madz

Technical User
Jan 31, 2001
33
0
0
SE
I have a HP LaserJet III connected to the parallel port
and want to print text which is in 7-bit.
The part that goes wrong is the stupid charsacters: å ä ö
I managed to print these in 8-bit, but how to print them in 7-bit or convert the 7-bit text to 8-bit?

thanks in advance
/mats
 
å,ä and ö is included in the 8-bit character set.

Entries in terminfo define printer characteristics as well as terminals. Interface scripts use this information to control the attached printers.
Make sure you define the printer type the first time you add the printer

lpadmin -p whatever -T hp -v /dev/lp0

How did you change the printer from printing 8-bit to 7-bit?

I´m trying to understand how control codes works. The codes that OS:s sends to printers to "teach" them how to print. I think this is for 8-bit character as well as CR/LF.

Try doing this...
use vi to create two files.
in the first file enter...

!R! frpo u6,10; exit;

make sure you hit enter behind the last ;

In the second file write...

räksmörgås

try printing this file using lp -d [que] file2

if it prints the words correctly (with å,ä,ö that is), try printing regular documents.

remember to take a look at the manualpages for lpadmin and terminfo.
/Sören
 
Thanks for your support,, I did not manage to print åäö in 7-bit. The problem is that I only can print these characters in 8-bit.

Is !R! frpo u6,10; exit; some kind of script?

I remember that I manually programmed a virtual canon printer so that it printed text correctly. This was on aix thou.That was a remotely printer this printer (canon) is connected directely to the parallel.


thanks.
/mats.
 
As I have understood the
!R! frpo u6,10; exit;
is the control codes that the OS sends to the printer (when wanting to print 8-bit character and cr/lf).

Every time you print something, this is sent to the printer first. You don´t see it of course, but it defines the following print-jobs. It functions as a driver.
It shouldn´t be printed but read into the memory of the printer.

Did you take a look at /usr/lib/terminfo/?/* ?

How did you add the printer? Did you use scoadmin or lpadmin?
What model did you choose?
I think HPLaserJet is the one to choose. Every laserprinter can emulate that printer. /Sören
 
Control codes are the first 32 characters in the ascii character set that may have meaning to the printer or terminal but don't print. CR/LF/FF are 3 of them that are used on every print job.
You can put control codes in the interface scripts to do all sorts of things. For example, I had a PC as a terminal that needed to use an attached printer in an emulation that didn't handle passthru printing natively. So prior to the cat statement in the printer script I used an echo statement that forwarded the control codes to turn the keyboard off, turn the terminal off, turn the printer on, tell the printer how to print, then cat the file, then reverse the steps to bring the terminal and printer back to normal operation.
I've run across the 7 bit, but it was a long time ago. Think I used stty to convert how the printer used it by defining the port but it is in the dim past.
Might try man ascii or man stty. Ed Fair
efair@atlnet.com

Any advice I give is my best judgement based on my interpretation of the facts you supply.

Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top