Hi,

I'm having some issues with a range that truncates texts, the below is
a (very) simplified version of the truncate method thats used in rails
(which is where I discovered this):

# this in an utf-8 encoded erb template (a rails "view" in my case)
<% text = "Eftersom jag jobbar som kontrukt÷˛/ingenj÷˛ pdagarna och
hackar cocoa" -%>
<%= text[0..47] %>
<br />
<%= text[0..48] %>
<br />
# notice the 'o' in ingenjor instead of '÷ž 
<% othertext = "Eftersom jag jobbar som kontrukt÷˛/ingenjor pdagarna
och hackar cocoa" -%>
<%= othertext[0..47] %>

#produces  this (the last character on the first line will display as
a "funny character" in browsers)

 Eftersom jag jobbar som kontrukt÷˛/ingenj÷˛ p?
 Eftersom jag jobbar som kontrukt÷˛/ingenj÷˛ p Eftersom jag jobbar som kontrukt÷˛/ingenjor p 

Is this a possible bug in Ruby (1.8.1) or could it be something with
Rails that gets in the way, I can reproduce this across two servers
and in webrick.
I was unable to do this properly in irb, since my terminal (or irb)
would act funny on the ÷ńňžs..

--johan

-- 
Johan S°˛ensen
Professional Futurist
www.johansorensen.com