schweini has asked for the wisdom of the Perl Monks concerning the following question:
Dear monks,
My ASCII-fu has been rusting away for a couple of years now, so I'm a bit confused about a problem i ran into yesterday:
I was sending spanish characters like 'αινσϊ ρρρρ' via cups to a samba-connected Epson LX-300 dot-matrix printer (in 'lpr -oraw' mode). The printer just printed some weird line-drawing-like characters, and no matter how I tried to adjust the character-tables in the printer (I might have done it wrong, though), no spanish characters were printed.
so I hacked up a little print PRN "$_ = ".chr($_)."\n" for (97 .. 255) script, and the characters actually DID appear this way on the printer, but on the linux-console the exact same ASCII codes represented different characters. I ended up just putting a s/ρ/chr($codes{'ρ'})/ge before the part that sends text to the printer, but this seems as a rather suboptimal solution.
So, what 'codepage' does linux or perl usually use (windows could print those characters just fine in raw printer mode)? does this have anything to do with unicode or those fancy I/O layers that open() now supports?
thanks in advance,
-schweini
My ASCII-fu has been rusting away for a couple of years now, so I'm a bit confused about a problem i ran into yesterday:
I was sending spanish characters like 'αινσϊ ρρρρ' via cups to a samba-connected Epson LX-300 dot-matrix printer (in 'lpr -oraw' mode). The printer just printed some weird line-drawing-like characters, and no matter how I tried to adjust the character-tables in the printer (I might have done it wrong, though), no spanish characters were printed.
so I hacked up a little print PRN "$_ = ".chr($_)."\n" for (97 .. 255) script, and the characters actually DID appear this way on the printer, but on the linux-console the exact same ASCII codes represented different characters. I ended up just putting a s/ρ/chr($codes{'ρ'})/ge before the part that sends text to the printer, but this seems as a rather suboptimal solution.
So, what 'codepage' does linux or perl usually use (windows could print those characters just fine in raw printer mode)? does this have anything to do with unicode or those fancy I/O layers that open() now supports?
thanks in advance,
-schweini
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: trouble printing spanish characters
by thundergnat (Deacon) on Oct 21, 2005 at 22:48 UTC | |
by graff (Chancellor) on Oct 21, 2005 at 23:50 UTC | |
Re: trouble printing spanish characters
by graff (Chancellor) on Oct 22, 2005 at 00:05 UTC | |
by schweini (Friar) on Oct 22, 2005 at 00:38 UTC |
Back to
Seekers of Perl Wisdom