String#upcase and downcase fail for multibyte characters #439

headius opened this Issue Dec 12, 2012 · 3 comments


None yet

2 participants

headius commented Dec 12, 2012


system ~/projects/jruby $ jruby -e "p 'FØØ'.downcase"

system ~/projects/jruby $ jruby -e "p 'føø'.upcase"

A crappy workaround for now would be str.to_java.to_upper_case.

keynmol commented Dec 12, 2012

Fortunately, UnicodeUtils gem works in JRuby, but dragging a whole gem for such miniscule task seems inappropriate.

So UnicodeUtils.downcase(str) looks a bit like crap, but it's a workaround nontheless.

headius commented Dec 12, 2012

Actually it appears that MRI does not case fold these characters either, so I'm closing this.

@headius headius closed this Dec 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment