Bug #8776
closedscript_name's encoding is wrong
Description
there's some wrong encoded string in exception's callstack couse by the script_name;s encoding is wrong .
Files
Updated by nobu (Nobuyoshi Nakada) over 11 years ago
- Status changed from Open to Rejected
External file path is expected filesystem encoding by default.
Updated by jiayp@glodon.com (贾 延平) over 11 years ago
But the external file path should encoded into internal encoding when it is used in ruby system, is it right?
What is the right opportunity to encode the path and fix the exception's calltack's encoding error?
Updated by nobu (Nobuyoshi Nakada) over 11 years ago
It's not right.
What is the right opportunity to encode the path and fix the exception's calltack's encoding error?
At the error handling, probably.
Updated by jiayp@glodon.com (贾 延平) over 11 years ago
I have seen the error handling code and don't know how to fix the error.
I once think ruby will do the encode work at the boundary of the external system as soon as possible,And keep the internal system clear with the internal encoding.If not so,How we know when to encode to what encoding?
Updated by jiayp@glodon.com (贾 延平) over 11 years ago
In this call flow
rb_f_load -> rb_load_internal -> rb_load_file_str -> load_file -> load_file_internal -> rb_parser_compile_string_path
When load a utf-8 encoded path will be considered a filesystem encoded path and load failure.