Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String#upcase and downcase fail for multibyte characters #439

Closed
headius opened this Issue Dec 12, 2012 · 3 comments

Comments

Projects
None yet
2 participants
@headius
Copy link
Member

headius commented Dec 12, 2012

Evidence:

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

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

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

@keynmol

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Member Author

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

@headius

This comment has been minimized.

Copy link
Member Author

headius commented Dec 12, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.