class method
Encoding.default_external=
(::Encoding enc) -> ::Encoding
[T < ::_ToStr] (T enc) -> T
Encoding.default_external = enc
encoding.c
View on GitHub ↗
static VALUE
set_default_external(VALUE klass, VALUE encoding)
{
rb_warning("setting Encoding.default_external");
rb_enc_set_default_external(encoding);
return encoding;
}
Sets default external encoding. You should not set Encoding::default_external in ruby code as strings created before changing the value may have a different encoding from strings created after the value was changed., instead you should use ruby -E to invoke ruby with the correct default_external.
See Encoding::default_external for information on how the default external encoding is used.
See also
.default_external
.default_internal
.compatible?
.default_internal=
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0