From: nobu@... Date: 2019-01-07T10:13:12+00:00 Subject: [ruby-core:90912] [Ruby trunk Bug#8123][Closed] Transcoding exception when using replace along with universal_newline Issue #8123 has been updated by nobu (Nobuyoshi Nakada). Status changed from Open to Closed It seems fixed by #11324. ---------------------------------------- Bug #8123: Transcoding exception when using replace along with universal_newline https://bugs.ruby-lang.org/issues/8123#change-76102 * Author: k776 (Kieran P) * Status: Closed * Priority: Normal * Assignee: * Target version: * ruby -v: 1.9.3 and 2.0.0 * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- The following can be reproduced on 1.9.3-p385, 1.9.3-p392, and 2.0.0-p0. body, charset = "hey", "hey".encoding.to_s body = body.encode('UTF-8', charset, :invalid => :replace, :undef => :replace, :replace => '', :universal_newline => true ) Encoding::ConverterNotFoundError: code converter not found (universal_newline) However, if you remove ":replace => '', ", then it works as intended. Seems you can't use the two options together. -- https://bugs.ruby-lang.org/ Unsubscribe: