Rails titlecase doesn't work on non-english letters
I'm trying to use title开发者_开发百科case to change an all uppercase words to nicer output. It works with non english letters but not on other letters. Is there any similar more UTF-8 friendly command?
"#{self.name.titlecase}"
Results: SkjÖldÓlfsstaÐi
Johann
This should work on unicode characters:
"SkjÖldÓlfsstaÐi".mb_chars.titlecase.to_s
Results: Skjöldólfsstaði
精彩评论