How one should add UTF-8 support to sorting in Ruby (including ł character, without affecting portability)?

Viewed 208

Ruby string functions are not supporting UTF-8.

For example ['l', 'ł', 'm'].sort returns ["l", "m", "ł"] rather than ["l", "ł", "m"].

How one should sort UTF-8 strings in Ruby?

Sorting UTF-8 strings in RoR - accepted answer has no support for ł character (issue open since 2015, blocked by PR waiting opened in 2014), waiting unmerged as of 2017-10-08.

ffi-icu answer works for systems that have libicu installed what AFAIK is not really portable.

1 Answers
Related