Closed
Description
These encoding aliases are actually dynamic, and can be changed by user code. For example if you have test.rb
:
Encoding.default_external = Encoding::Windows_1253
require_relative "test2"
p $foo.encoding
and test2.rb
:
# encoding: external
$foo = "\xb5"
then the whole thing will print #<Encoding:Windows-1253>
. Currently we alias a lot of these to UTF-8, and don't handle internal
at all. This whole thing needs to be revisited to allow consumers to pass in their encodings.