While trying out ruby's utf-8 features, i came across a problem. I input a string with only special chars ("ş"
to be more precise). After executing the code below, the text cursor and the input field got corrupted.
the code:
a = "ş"
puts a.slice(0,1)
Because the special chars stored with 2 bytes, slicing a one byte part doesn't return a correct value. I believe this
is caused by an unhandled exception.
I attached the problems screenshot also.
fxri was running on a windows xp and it was bundled with ruby-186-26 self-extraction package. |