Bug #2154

filesystem encoding of UNIX

Added by usa (Usaku NAKAMURA) over 2 years ago. Updated about 1 year ago.

[ruby-dev:39393]
Status:Closed Start date:09/28/2009
Priority:Normal Due date:
Assignee:naruse (Yui NARUSE) % 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

Revision 25139
Added by naruse (Yui NARUSE) over 2 years ago

* 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.

Revision 25140
Added by naruse (Yui NARUSE) over 2 years ago

* 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.

Also available in: Atom PDF