class ActiveSupport::Multibyte::Chars

def titleize

"日本語".mb_chars.titleize.to_s # => "日本語"
"ÉL QUE SE ENTERÓ".mb_chars.titleize.to_s # => "Él Que Se Enteró"

Capitalizes the first letter of every word, when possible.
def titleize
  chars(downcase.to_s.gsub(/\b('?\S)/u) { $1.upcase })
end