fix bytesize in exception template; multibyte titleize

Hi all,

I wanted to draw some attention to a couple of very small multibyte-related patches I believe should be included before Rails 3.0 RC1:

  • Use String#bytesize rather than String#length in exception templates:

This is a simple case where string length is checked, but bytes is needed, so it breaks with string with multibyte chars.

  • Add AS::Multibyte::Chars#titleize

This makes “café”.mb_chars.titleize “do the right thing,” in the sprit of a few other patches I recently submitted.

I realize Railsconf is going on (I’m here!) but I thought it might be good to point these two out before it’s too late.



Any chance somebody could take a quick look at these? I think they’re worth including before the release candidate.