unicode parameters cannot be passed to ruby
On windows, Ruby should provide
wmain to allow passing unicode parameters (especially file paths are of interest).
#1 Updated by usa (Usaku NAKAMURA) over 8 years ago
On windows, Ruby should provide wmain to allow passing unicode parameters (especially file paths are of interest).
It doesn't make sense.
BTW, we have tha plan that UTF-8'ed ARGV with -Eutf-8 option,
but not implemented yet.
#3 Updated by usa (Usaku NAKAMURA) over 8 years ago
Why? May be wmain is not the right thing, but at least Unicode parameters should be possible to accept if it is windows application (probably using
GetCommandLineWAPI function). UTF-8 is nice but that is different story.
GetCommandLineW() is correct way, and providing
is nonsence. (Who use it?)
Our current plan is that using UTF-8 instead of UTF-16LE as internal
We have not fixed whether supporting to pass UTF-16LE'ed
ARGV to user
script or not.
If we will do so, the priority might be low.
#4 Updated by vo.x (Vit Ondruch) over 8 years ago
For me, internal encoding doesn't matter, since the conversion is pretty easy. But important is that the following example will work properly:
C:\>echo puts ARGV > uparam.rb C:\>ruby\bin\ruby.exe uparam.rb của_zufällige_žluťoučký_разлога c?a_zufällige_luoučký_??????? C:\>
#12 [ruby-core:48465] Updated by usa (Usaku NAKAMURA) over 5 years ago
- Description updated (diff)
I think that if
-Eutf-8 is specified
ARGV should be parsed from
and converted to UTF-8.
But it's difficult to change ruby with keeping compatibility.
I'll try it till code freeze, but I can't promise that it will be in time for 2.0.