From: nobu@... Date: 2016-02-05T02:48:47+00:00 Subject: [ruby-core:73702] [Ruby trunk Bug#12051] String#encode with xml: option returns wrong result Issue #12051 has been reported by Nobuyoshi Nakada. ---------------------------------------- Bug #12051: String#encode with xml: option returns wrong result https://bugs.ruby-lang.org/issues/12051 * Author: Nobuyoshi Nakada * Status: Assigned * Priority: Normal * Assignee: Akira Tanaka * ruby -v: r53739 * Backport: 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED ---------------------------------------- `String#encode`���ASCII���������������������������������������������������������������������������`xml:`��������������������������������������������������������������������� ��������������������������������������������������������� ```ruby p "<\0>\0".encode("utf-16le", "utf-16le", xml: :text) #=> "\u6C26\u3B74\u2600\u7467;" ``` -- https://bugs.ruby-lang.org/ Unsubscribe: