Project

General

Profile

Feature #1900

Suggestion: Encoding#ascii_compatible?

Added by candlerb (Brian Candler) over 11 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:24793]

Description

=begin
An important property of an Encoding is whether it is ASCII-compatible. However as far as I can see, you can only test for this indirectly, e.g.

Encoding.compatible?("a".force_encoding("ISO-8859-1"), "a".force_encoding("US-ASCII"))

So I suggest exposing rb_enc_asciicompat as a property of the Encoding objects themselves.
=end

Also available in: Atom PDF