console vs ^X

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Tue Sep 29 14:50:00 GMT 2009


On Tue, Sep 29, 2009 at 03:34:15PM +0200, Corinna Vinschen wrote:
>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?

How about a question mark and a beep, or just a beep?

cgf



More information about the Cygwin-developers mailing list