"be consistent" | |
PerlMonks |
trouble printing spanish charactersby schweini (Friar) |
on Oct 21, 2005 at 20:20 UTC ( [id://502117]=perlquestion: print w/replies, xml ) | Need Help?? |
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
Back to
Seekers of Perl Wisdom
|
|