Ruby 1.9: how can I properly upcase & downcase multibyte strings?

后端 未结 3 403
自闭症患者
自闭症患者 2020-11-28 06:29

So matz made the decision to keep upcase and downcase limited to /[A-Z]/i in ruby 1.9.1.

ActiveSupport::Multibyte

3条回答
  •  鱼传尺愫
    2020-11-28 07:08

    Case conversion is locale dependent and doesn't always round-trip, which is why Ruby 1.9 doesn't cover it (see here and here)

    The unicode-util gem should address your needs.

提交回复
热议问题