console vs ^X

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Sep 29 13:34:00 GMT 2009


On Sep 29 15:02, Corinna Vinschen wrote:
> On Sep 29 14:38, Corinna Vinschen wrote:
> > On Sep 29 14:25, Corinna Vinschen wrote:
> > > On Sep 29 12:28, Andy Koppe wrote:
> > > > Trying the latest DLL with Corinna's patches (thanks!), I noticed the
> > > > following issue in the console.
> > > > 
> > > > With the charset configured to something other than UTF-8, if you
> > > > press a key that isn't in that charset, the console will send a
> > > > ^X-UTF8 sequence. ^X is special to readline though, hence weird
> > > > effects might ensue.
> > > 
> > > On output?  It's just printed to the console so what should happen?!?
> > 
> > Looks like I misunderstood you completely.  Please scratch my previous
> > reply.
> > 
> > If you press a char which isn't in the charset it will be converted to a
> > ^X sequence on input, of course.  The problem is just still, what do you
> > expect it should generate instead?  There is no 100% safe replacement
> > mapping, afaics, given that any ASCII control char could have some
> > special meaning.
> 
> I assume the only safe approach is to ignore the keypress entirely
> if it's not in the current charset.

We could also just replace the char with a question mark.  That's what
cmd does in border cases, AFAICS.  Sometimes it replaces the character
with a base character (in 1251, for instance, a-umlaut with just a),
but that's not something we can do in a simple way.

So, ignore the key or question mark?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat



More information about the Cygwin-developers mailing list