This project is archived and is in readonly mode.

#1483 ✓committed
Jason Cheow

#ord method for ActiveSupport::Multibyte::Chars

Reported by Jason Cheow | November 26th, 2008 @ 03:15 PM

This patch adds a ActiveSupport::Multibyte::Chars#ord method so that it returns correct Unicode value instead of falling back on String#ord in CoreExtensions, which is not multibyte compatible.

Before patch:

'こんにちは'.mb_chars.ord #=> 227

After patch:

'こんにちは'.mb_chars.ord #=> 12371

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket


Referenced by