in reply to trouble printing spanish characters
If you're getting "line drawing characters" at the printer, your script might be sending the characters as utf8, and in that case, using the Encode module (and its "encode()" function), as shown in the first reply, is likely to be the right way to go -- though actually, assuming that perl is initially storing your strings internally as utf8, something like this would be simpler:
By setting a PerlIO layer on your PRN file handle to apply the character encoding transfor for you (from utf8 to cp437), you don't need to do anything else -- you don't need "use Encode", you don't need any substitutions or other alterations of your string data.binmode( PRN, ":encoding(cp437)" );
Your statement of the problem was vague enough that I can't be sure this is the right answer, but this is a place to start, at least.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: trouble printing spanish characters
by schweini (Friar) on Oct 22, 2005 at 00:38 UTC |