From: usa@... Date: 2017-04-20T12:40:04+00:00 Subject: [ruby-core:80808] [Ruby trunk Feature#13488] Set Encoding.default_external to UTF-8 on Windows Issue #13488 has been updated by usa (Usaku NAKAMURA). larskanis (Lars Kanis) wrote: > The current setting is a major interoperability issue and it is neither useful nor expected, because nobody seriously uses the ancient locale dependent cpXYZ encodings for file content. Come Japan and check Japanese Windows users' text files :) > If a native encoding shall be used, it should be UTF-16 on Windows. However UTF-16 would make interoperability and compatibility even more difficult. So the only reliable choice for default_external is UTF-8, IMHO. I agree. We won't change the default of `Encoding.default_encoding` before Ruby3 because of to keep compatibility. And, at Ruby3, we will change it to UTF-8, perhaps. ---------------------------------------- Feature #13488: Set Encoding.default_external to UTF-8 on Windows https://bugs.ruby-lang.org/issues/13488#change-64406 * Author: larskanis (Lars Kanis) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- Currently Encoding.default_external is set to the local ANSI encoding of the Windows installation unless changed per option `-E`. This is cp850 for Western Europe. It should be changed to UTF-8. The current setting is a major interoperability issue and it is neither useful nor expected, because nobody seriously uses the ancient locale dependent cpXYZ encodings for file content. If a native encoding shall be used, it should be UTF-16 on Windows. However UTF-16 would make interoperability and compatibility even more difficult. So the only reliable choice for default_external is UTF-8, IMHO. This is already patched per [1] in the upcoming RubyInstaller-2.4 for Windows release. It additionally requires a few changes to MRIs encoding tests. [1] https://github.com/oneclick/rubyinstaller2/blob/master/recipes/compile/ruby-2.4.1/0005-utf-8-default-encoding.patch -- https://bugs.ruby-lang.org/ Unsubscribe: