Wierd cut and paste issue with irb


#1

I just mangled a bunch of data because pasting it into irb is dropping
characters for me. The below is probably going to have really crappy
formatting but basically what I did is print a 1000 character long
string
(puts “x”*1000), copy that string, and paste it into double quotes and
append .size ("".size). I copy 1000 characters but it only
pastes in
999! If I paste the same string into shell not running irb I get all
1000
characters.

I’m using Eterm on Ubuntu linux but I have ruled out the Eterm since if
I
just exit irb and do the same thing with echo on the command line (echo
-n
“” | wc -c ) I get the correct number of characters.

I tried with both readline on and off, and saw no difference. If I
paste
other 1000 byte strings in I might lose 1, 2, or 3 characters. I lose
more
if the string is longer.

irb(main):008:0> puts “x”*1000
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
| wc -c
1000

Up until now I have been using irb as a shell to do set operations…now
I
am afraid.

/frustrated
Jason


#2

OK, after further investigation this appears to be an issue just on
unbuntu
linux. Works find on my friends mac and on his redhat system. I’d be
interested if anyone else can recreate this on ubuntu.

Jason


#3

Jason W. wrote:

“” | wc -c ) I get the correct number of characters.
I can reproduce it on Suse (SLES 9.2) with XTerm.
further investigation showed, that the problem turned up if
more than 512 characters were copied. Always the 511th
character (the one with index 510) was removed.
Strange.

Michael


Michael U.
R&D Team
ISIS Information Systems Austria
tel: +43 2236 27551-219, fax: +43 2236 21081
e-mail: removed_email_address@domain.invalid
Visit our Website: www.isis-papyrus.com