You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MRI seems to always use UTF-8 by default when loading source files. This is used by the lexer & parser, but doesn't update the runtime's encoding. JRuby, on the other hand, seems to always use whatever the default_external encoding is, which is influenced by the system's locale.
$ cat enc.rb
p Encoding.default_external
p __ENCODING__
$ LC_ALL=C bin/jruby -v enc.rb
jruby 9.0.0.0-SNAPSHOT (2.2.1) 2015-04-17 7b6475d Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [linux-amd64]
#<Encoding:US-ASCII>
#<Encoding:US-ASCII>
$ LC_ALL=C ruby -v enc.rb
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
#<Encoding:US-ASCII>
#<Encoding:UTF-8>
The text was updated successfully, but these errors were encountered:
MRI seems to always use UTF-8 by default when loading source files. This is used by the lexer & parser, but doesn't update the runtime's encoding. JRuby, on the other hand, seems to always use whatever the default_external encoding is, which is influenced by the system's locale.
The text was updated successfully, but these errors were encountered: