From: "zenspider (Ryan Davis) via ruby-core" Date: 2026-08-13T18:56:38+00:00 Subject: [ruby-core:126387] [Ruby Feature#22244] `ruby -UU` should set both internal and external, `ruby -E` should print encoding list Issue #22244 has been updated by zenspider (Ryan Davis). PR is being worked down with feedback from @nobu https://github.com/ruby/ruby/pull/18319 :heart: ---------------------------------------- Feature #22244: `ruby -UU` should set both internal and external, `ruby -E` should print encoding list https://bugs.ruby-lang.org/issues/22244#change-118524 * Author: zenspider (Ryan Davis) * Status: Open ---------------------------------------- ``` 10004 $ env -u LANG ruby -U -e 'pp [Encoding.default_internal, Encoding.default_external]' [#, #] 10005 $ env -u LANG ruby -EUTF-8 -e 'pp [...]' [nil, #] 10006 $ env -u LANG ruby -EUTF-8 -U -e 'pp [...]' [#, #] 10007 $ env -u LANG ruby -EUTF-8:UTF-8 -e 'pp [...]' [#, #] 10008 $ env -u LANG ruby -UU -e 'pp [...]' [#, #] ``` I think the option processing of encodings is VERY poorly documented and frustrating to try to use. 1. --help doesn't list -U. (The man page does) 2. --help for -E doesn't provide a means to get a list of available encoding names (same with manpage), leading me to try U, UTF8, UTF_8, before finding UTF-8. `ruby -E` could just print them all out. 3. WHY NOT take UTF8 or UTF_8 (since that's the class name)? 4. Please consider `-UU` to mean `-EUTF-8:UTF-8` -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/