[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: print non-kb characters
- From: Rob Kendrick <rjek@...>
- Date: Mon, 27 Jun 2011 19:44:16 +0100
On Mon, Jun 27, 2011 at 02:40:53PM -0400, Dave Collins wrote:
> > Modern *nix terminals should be using UTF-8 already. On WinXP
> > console, you need to switch to UTF-8 (code page 65001), then just
> > write out the UTF-8 bytes. Something like that, perhaps?
>
> Let's pretend we're waaaay overthinking this.
>
> Let's try this:
>
> print ("-" .. " is a hyphen")
> print ( ?? .. " is an n-dash")
But we're not. The value you need to put in place of ?? is dependant on
your terminal and which character encoding/code page it uses. If it's
UTF-8, then your life's pretty easy.
B.