Re: Please help me with this perl question
[email protected] (Dean Hoover) Fri, 30 Dec 2011 15:24:47 -0500
| Newsgroups | perl.unicode |
|---|---|
| Message-ID | <CAHqPdTdnX9bVGzOjM95Ba2Ypkuo6W5rNXMN606yw5dBFt6Ecig@mail.gmail.com> |
--f46d044403ac2e000b04b55506a4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I don't see how you can do that... you are dependent on the capabilities of the terminal. If its an old school text terminal, you can't just draw arbitrary stuff like a rotated D. That is pretty fancy and even in graphics mode has nothing to do with perl, or do I misunderstand your question? On Fri, Dec 30, 2011 at 2:12 PM, Michael Ludwig <[email protected]> wrote: > FORREST COPLEY schrieb am 29.12.2011 um 10:48 (-0700): > > Is it possible to write a perl script to print a completely custom > > character on a console text terminal? > > Say a D rotated 90 degrees or something. > > or an A with the innards filled in. > > Here's how to print alpha to omega: > > perl -C2 -lwe 'print join q(, ), map chr, 0x391 .. 0x3a9' > > =CE=91, =CE=92, =CE=93, =CE=94, =CE=95, =CE=96, =CE=97, =CE=98, =CE=99, = =CE=9A, =CE=9B, =CE=9C, =CE=9D, =CE=9E, =CE=9F, =CE=A0, =CE=A1, =CE=A2, =CE= =A3, =CE=A4, =CE=A5, =CE=A6, =CE=A7, =CE=A8, =CE=A9 > > If you know the Unicode codepoints you can certainly print the characters= . > For Perl, it's essentially numbers. > > Whether your particular character comes out nicely or not depends on > whether the font you're using has the glyph in question. > > Next time you might want to spend two seconds or even ten thinking > about a suitable subject line =E2=80=A6 > > -- > Michael Ludwig > --f46d044403ac2e000b04b55506a4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I don't see how you can do that... you are dependent on the capabilitie= s of the terminal. If its an old school text terminal, you can't just d= raw=C2=A0arbitrary=C2=A0stuff like a rotated D. That is pretty fancy and ev= en in graphics mode has nothing to do with perl, or do I misunderstand your= question?<br> <br><div class=3D"gmail_quote">On Fri, Dec 30, 2011 at 2:12 PM, Michael Lud= wig <span dir=3D"ltr"><<a href=3D"mailto:[email protected]">[email protected]</a= >></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 = 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> FORREST COPLEY schrieb am 29.12.2011 um 10:48 (-0700):<br> > Is it possible to write a perl script to print a completely custom<br> > character on a console text terminal?<br> > Say a D rotated 90 degrees or something.<br> > or an A with the innards filled in.<br> <br> Here's how to print alpha to omega:<br> <br> perl -C2 -lwe 'print join q(, ), map chr, 0x391 .. 0x3a9'<br> <br> =CE=91, =CE=92, =CE=93, =CE=94, =CE=95, =CE=96, =CE=97, =CE=98, =CE=99, =CE= =9A, =CE=9B, =CE=9C, =CE=9D, =CE=9E, =CE=9F, =CE=A0, =CE=A1, =CE=A2, =CE=A3= , =CE=A4, =CE=A5, =CE=A6, =CE=A7, =CE=A8, =CE=A9<br> <br> If you know the Unicode codepoints you can certainly print the characters.<= br> For Perl, it's essentially numbers.<br> <br> Whether your particular character comes out nicely or not depends on<br> whether the font you're using has the glyph in question.<br> <br> Next time you might want to spend two seconds or even ten thinking<br> about a suitable subject line =E2=80=A6<br> <font color=3D"#888888"><br> --<br> Michael Ludwig<br> </font></blockquote></div><br> --f46d044403ac2e000b04b55506a4--