title: Length of a unicode string
body: <p>In my Rails (2.3, Ruby 1.8.7) application, I need to truncate a string to a certain length. the string is unicode, and when running tests in console, such as <code>'א'.length</code>, I realized that a double length is returned. I would like an encoding-agnostic length, so that the same truncation would be done for a unicode string or a latin1 encoded string.</p>
  
  <p>I've gone over most of the unicode material for Ruby, but am still a little in the dark. How should this problem be tackled?</p>