Bug #2154
filesystem encoding of UNIX
| Status: | Closed | Start date: | 09/28/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | M17N | |||
| Target version: | 2.0.0 | |||
| ruby -v: | ruby 1.9.2dev (2009-09-28 trunk 25132) [i386-mswin32] |
Description
「Ruby M17N の設計と実装」によると(*1)、UNIXにおけるfilesystem encodingはlocaleであると書かれているのですが、実際には現在の 実装はdefault externalになっています。 実装の方が間違ってる気がするのですが、どうでしょうか? *1 http://jp.rubyist.net/magazine/?0025-Ruby19_m17n#l23
Associated revisions
* hash.c (rb_f_getenv): use rb_filesystem_str_new_cstr
instead of rb_str_new2.
ENV['PATH'].encoding should be Filesystem Encoding
because its content is related to filesystem.
see [ruby-dev:39393]
* hash.c (env_fetch): ditto.
* string.c (rb_filesystem_str_new): defined.
* string.c (rb_filesystem_str_new_cstr): ditto.
* include/ruby/intern.h (rb_filesystem_str_new): added.
* include/ruby/intern.h (rb_filesystem_str_new_cstr): ditto.
* encoding.c (rb_filesystem_encoding): On Unix systems,
filesystem encoding should be locale encoding.
[ruby-dev:39393] and see also [ruby-dev:35617]
History
Updated by naruse (Yui NARUSE) over 2 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset r25140.