Skip to content
instance method

Encoding::Converter#replacement=

(::String str) -> ::String
ec.replacement = string

Sets the replacement string.

Example
ec = Encoding::Converter.new("utf-8", "us-ascii", :undef => :replace)
ec.replacement = "<undef>"
p ec.convert("a \u3042 b")      #=> "a <undef> b"
See also #replacement #source_encoding #putback also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0