Skip to content
instance method

Encoding#ascii_compatible?

() -> bool
enc.ascii_compatible? → true or false

Returns whether ASCII-compatible or not.

Example
Encoding::UTF_8.ascii_compatible?     #=> true
Encoding::UTF_16BE.ascii_compatible?  #=> false
See also .name_list #dummy? .locale_charmap #inspect also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0