Project

General

Profile

Actions

Bug #5486

closed

rb_stat() doesn’t respect input encoding

Added by now (Nikolai Weibull) over 12 years ago. Updated about 12 years ago.

Status:
Closed
Target version:
-
ruby -v:
-
Backport:
[ruby-core:40412]

Description

rb_stat() overrides the input strings encoding and applies one of various encodings through rb_str_encode_ospath(). This may be convenient for certain kinds of user input or input from a source file in a different encoding, but it isn’t good for other kinds of user input or input from other functions, such as Dir.entries.

If Ruby wants us to be explicit about encodings, then Ruby shouldn’t change it behind our backs.

I suspect that this is an issue that may appear in various other functions as well.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0