[#49637] 重要: 非互換性の可能性 Fwd: [ruby-cvs:62388] duerst:r55225 (trunk): * string.c: Activate full Unicode case mapping for UTF-8 — Martin J. Dürst <duerst@...>
下記の通り、大文字小文字変換を UTF-8 において ASCII
3 messages
2016/05/31
[ruby-dev:49625] [Ruby trunk Bug#12368] default encoding of Integer#chr
From:
duerst@...
Date:
2016-05-17 08:28:08 UTC
List:
ruby-dev #49625
Issue #12368 has been updated by Martin Dürst. What about making the default UTF-8. This is the same as source encoding for many scripts now. According to the experts at the Ruby Committer meeting, the information about the script encoding is only available in the parser. ---------------------------------------- Bug #12368: default encoding of Integer#chr https://bugs.ruby-lang.org/issues/12368#change-58685 * Author: Usaku NAKAMURA * Status: Open * Priority: Normal * Assignee: * ruby -v: * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- 現状、`Integer#chr`は引数なしの場合には、 1. default internalが設定されていればそれを使う 2. default internalが`nil`ならASCII(-8BIT)とみなす という挙動になっていますが、2の部分についてはかつてscript encodingのデフォルトがUS-ASCIIだった時代の名残のような気がします。 というわけで、2の場合にはscript encodingとみなすのが正しいのではないでしょうか。 ---Files-------------------------------- chr.diff (1.51 KB) -- https://bugs.ruby-lang.org/