Project

General

Profile

Actions

Feature #14077

open

Add Encoding::FILESYSTEM and Encoding::LOCALE constants

Added by nirvdrum (Kevin Menard) over 3 years ago. Updated over 3 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:83658]

Description

The Encoding class has constants defined for all of the standard encodings, but does not have constants defined for some of the special encodings. In particular, the "filesystem" and "locale" encodings do not have a corresponding Encoding::FILESYSTEM and Encoding::LOCALE. As a result, every time they need to be used they must be looked up using Encoding.find. As far as I can tell, neither of these special encodings can change after the Ruby process has been started up. Even changing the $LANG environment variable within the Ruby process doesn't seem to affect the value for these special encodings.

Therefore, I'm proposing the introduction of Encoding::FILESYSTEM and Encoding::LOCALE constants both as a matter of consistency and as a matter of efficiency.

Actions

Also available in: Atom PDF