Returns the codepoint of the first character of the string, assuming a single-byte character encoding:
Note that the 224 is different in both examples. In ISO-8859-1 “Ã ” is represented as a single byte, 224. In UTF8 it is represented with two bytes, namely 195 and 160, but its Unicode codepoint is 224. If we call ord on the UTF8 string “Ã ” the return value will be 195. That is not an error, because UTF8 is unsupported, the call itself would be bogus.
# File activesupport/lib/active_support/core_ext/string/conversions.rb, line 27 def ord self end