Project

General

Profile

This project is closed and read-only.

Actions

Backport #4869

closed

2206368128.chr(Encoding::UTF_8) fails strangely

Backport #4869: 2206368128.chr(Encoding::UTF_8) fails strangely

Added by postmodern (Hal Brodigan) over 15 years ago. Updated over 10 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: PDF Atom