Problem using HighLine for password prompt on Windows

I am trying to use the HighLine library for password prompting on
Windows and cannot make it work properly.

Environment:
* Windows XP SP3
* ruby 1.9.2p290 (2011-07-09) [i386-mingw32]
* highline 1.6.9

Program:

    require 'rubygems'
    require 'highline/import'
    p ask('Password: ') { |q| q.echo = '*' }

Problem:

When entering "12345" + Backspace twice + Enter at the prompt I get:

    W:\work> ruby tst.rb
    Password: ****←[←[P
    "123"

When entering "12345" + Left Arrow twice + Enter at the prompt I get:

    W:\work> ruby tst.rb
    Password: *********
    "12345\xE0K\xE0K"

This is not exactly what I was hoping for. If using HighLine with JRuby
the problem is more or less the same. Am I missing something or is
this a bug/limitation of HighLine?

Claus

···

--
Posted via http://www.ruby-forum.com/.

Claus Folke Brobak wrote in post #1040663:

I am trying to use the HighLine library for password prompting on
Windows and cannot make it work properly.

No one has tried this?

Claus

···

--
Posted via http://www.ruby-forum.com/\.

I haven't, but I have a hunch this has something to do with terminal
escape sequences in Windows vs. those in *nix.

···

On Mon, Jan 16, 2012 at 9:59 AM, Claus Folke Brobak <cfb@jndata.dk> wrote:

Claus Folke Brobak wrote in post #1040663:

I am trying to use the HighLine library for password prompting on
Windows and cannot make it work properly.

No one has tried this?

Claus