Reputation: 819
I'm trying to use titlecase 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
Upvotes: 1
Views: 156
Reputation: 3080
This should work on unicode characters:
"SkjÖldÓlfsstaÐi".mb_chars.titlecase.to_s
Results: Skjöldólfsstaði
Upvotes: 2