[#84280] [Ruby trunk Bug#14181] hangs or deadlocks from waitpid, threads, and trapping SIGCHLD — nobu@...
Issue #14181 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/12/15
[#84398] [Ruby trunk Bug#14220] WEBrick changes - failures on MSWIN, MinGW — Greg.mpls@...
Issue #14220 has been reported by MSP-Greg (Greg L).
3 messages
2017/12/22
[#84472] Re: [ruby-dev:50394] [Ruby trunk Bug#14240] warn four special variables: $; $, $/ $\ — Eric Wong <normalperson@...>
Shouldn't English posts be on ruby-core instead of ruby-dev?
3 messages
2017/12/26
[ruby-core:84040] [Ruby trunk Feature#13124] Should #puts convert to external encoding?
From:
eregontp@...
Date:
2017-12-01 18:45:28 UTC
List:
ruby-core #84040
Issue #13124 has been updated by Eregon (Benoit Daloze).
naruse (Yui NARUSE) wrote:
> But it breaks command line utilities which handles encoding other than locale.
What kind of utilities use a different encoding than the locale?
Do you have an example?
It seems to me that if an utility needs to output in a different encoding than the locale,
then one needs to manually set the encoding of STDOUT anyway, so the default encoding conversion would not be an issue.
----------------------------------------
Feature #13124: Should #puts convert to external encoding?
https://bugs.ruby-lang.org/issues/13124#change-68127
* Author: Eregon (Benoit Daloze)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
For instance:
puts "?\x00\x42\x30".force_encoding(Encoding::UTF_16LE)
?B0
puts "?\x00\x42\x30".force_encoding(Encoding::UTF_16LE).encode("utf-8")
?あ
The first result is surprising to me. It seems to treat the String as raw bytes and just "assume" they are displayable in the external encoding.
Should #puts re-encode the String to print in Encoding.default_external or the locale encoding?
STDOUT.set_encoding(Encoding.find("locale"))
seems to do what I expect, but should that be the default?
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>