Forum: Ruby-dev StringIO#putc is unnaware of encoding

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
5cf8f058a4c094bb708174fb43e7a387?d=identicon&s=25 unknown (Guest)
on 2014-05-28 16:40
(Received via mailing list)
Issue #9765 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.0.0: DONE, 2.1: REQUIRED to 2.0.0: DONE, 2.1:

r45646 was backported into `ruby_2_1` branch at r46197.

Bug #9765: StringIO#putc is unnaware of encoding

* Author: Nobuyoshi Nakada
* Status: Closed
* Priority: Normal
* Assignee: Nobuyoshi Nakada
* Category: ext
* Target version: current: 2.2.0
* ruby -v: r45637
* Backport: 2.0.0: DONE, 2.1: DONE

IO.pipe{|r,w| w.putc("\u{3042}"); w.putc(0x3044); w.close; p}
# => "あD"

require 'stringio'
sio =""); sio.putc("\u{3042}"); sio.putc(0x3044); p
# => "\xE3D"
This topic is locked and can not be replied to.