From: "byroot (Jean Boussier)" Date: 2022-01-17T11:53:17+00:00 Subject: [ruby-core:107159] [Ruby master Bug#18495] `LC_ALL=C.UTF-8` sets `Encoding.default_external` to `Encoding::US_ASCII` Issue #18495 has been updated by byroot (Jean Boussier). So I dug into the code a bit, and Ruby seem to delegate most of that to the system with `nl_langinfo` And reading more into it, it seems that `C.UTF-8` while common, isn't POSIX, and my system seem to behave the same: ```bash $ env LC_ALL=C.UTF-8 locale charmap US-ASCII ``` ---------------------------------------- Bug #18495: `LC_ALL=C.UTF-8` sets `Encoding.default_external` to `Encoding::US_ASCII` https://bugs.ruby-lang.org/issues/18495#change-96014 * Author: byroot (Jean Boussier) * Status: Open * Priority: Normal * ruby -v: ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x86_64-darwin21] * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- Original bug report on Bootsnap: https://github.com/Shopify/bootsnap/issues/395#issuecomment-1014421271 ```bash $ env LC_ALL=en_US.UTF-8 ruby -e 'p Encoding.default_external' # $ env LC_ALL=C.UTF-8 ruby -e 'p Encoding.default_external' # ``` I'm not particularly familiar with `LC_ALL`, but from what I gathered online, `C.UTF-8` is supposed to mean "no internationalization, but UTF-8 support". -- https://bugs.ruby-lang.org/ Unsubscribe: