Ruby: Find all special chars in String (umlauts etc)

1 minute read

Out Of Date Warning

This article was published on 26/10/2011, this means the content may be out of date or no longer relevant.
You should verify that the technical information in this article is still up to date before relying upon it for your own purposes.

>> text = "Grüße"
>>{|i| i.bytesize != i.chars.count}.uniq
=> ["ü", "ß"]

Reposted from