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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.