Project

General

Profile

Actions

Backport #4869

closed

2206368128.chr(Encoding::UTF_8) fails strangely

Added by postmodern (Hal Brodigan) over 13 years ago. Updated over 8 years ago.

Status:
Rejected
[ruby-core:36996]

Description

While testing some code which attempted to decode integers into UTF-8 characters, I noticed one number failed to decode:

2206368128.chr(Encoding::UTF_8)
# => RangeError: -2088599168 out of char range

The negative number within the exception makes me wonder if an Integer Overflow is occurring within the M17N code.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0