Operating System - HP-UX
1825771 Members
2209 Online
109687 Solutions
New Discussion

Printing Text Files with special Characters in HP-UX...

 
Alzhy
Honored Contributor

Printing Text Files with special Characters in HP-UX...

Do I need to set up anything special so "lp" can send a text file to the printer and print a text document containing special caharacters (i.e. óá¿ñ) properly?

I attach a sample text file (in Spanish with some accented characters).

Hakuna Matata.
8 REPLIES 8
Court Campbell
Honored Contributor

Re: Printing Text Files with special Characters in HP-UX...

Yo no sé. Quizás necessite cambiar LANG a univ.utf8.

ej.

# export LANG=univ.utf8
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Court Campbell
Honored Contributor

Re: Printing Text Files with special Characters in HP-UX...

I hate it when the characters get changed.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Alzhy
Honored Contributor

Re: Printing Text Files with special Characters in HP-UX...

Senor Court,

No Dice... I can view the text on my terminal but not all -- the open/close single and double quotes are displayed on screen as ~S/~T and ~Q/~R respectively.

When I print this file which is stored as text file (FTP'd via Locale 8 protocol) - the special characters do not print at all...


Any other ideas?
Hakuna Matata.
Court Campbell
Honored Contributor

Re: Printing Text Files with special Characters in HP-UX...

I had this same issue at the last company I worked at when we rolled out Oracle to South America. I do not remember if we found a way to resolve it. It's been awhile but a I will call and see if any one knows/remembers.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Tony Berry
Valued Contributor

Re: Printing Text Files with special Characters in HP-UX...

I don't know if it will catch ALL the special characters, but 'lp -oraw' works in our special cases. We print to HP LaserJet printers. I assume the same in your case. You could also explore some of the options in 'hppi' to see if a custom printer script would work.
Unix is boss.
A. Clay Stephenson
Acclaimed Contributor

Re: Printing Text Files with special Characters in HP-UX...

Bear in mind that the printer doesn't have a clue that it is being sent characters of any alphabet. It is just receiving bits of data; most commonly octets (bytes) and sometimes wide-characters as well. How those bits are displayed is solely the function of the display device (the printer in this case);

For example, the data file might contain the octets 65,66, and 67 (dec) but it is solely the job of the terminal or printer to output 'A','B', and 'C' respectively or '1','2', or '3'.

The key to what you are trying to do is the printer's interface file. For example, a common laserjet PCL option is -otype<#> where <#> is the desired font number.

Without knowing the specific printer, it's not possible to answer in detail. This will be extremely difficult if this is a Remote rather than a Network printer. Do a man_ljx000 as a start.
If it ain't broke, I can fix that.
Alzhy
Honored Contributor

Re: Printing Text Files with special Characters in HP-UX...

I requested our apps team to write a "wrapper" and not just submit these "text" files to the printer hoping the characters will be interpreted by the printer.

Hopefully they can come up with a resultant PS or PCL file that will be the one to be sent to the printer.

Hakuna Matata.
Bill Hassell
Honored Contributor

Re: Printing Text Files with special Characters in HP-UX...

As Clay writes, there is no connection between terminals, printers and other display devices concerning non-standard characters. Each printer has it's own internal fonts, each model (and especially each manufacturer) may have entirely different maps for each of the special codes. This will be an interesting task, especially if the number of 'supported' printers is unlimited.


Bill Hassell, sysadmin