Bug #1771

system()/popen()/popen3() & windows & unicode is not working

Added by Jarek Kuboš almost 5 years ago. Updated 10 months ago.

[ruby-core:24309]
Status:Closed
Priority:Normal
Assignee:Usaku NAKAMURA
Category:M17N
Target version:next minor
ruby -v:ruby 1.9.2dev (2009-07-08) [i386-mswin32_90] Backport:

Description

=begin
Hi,

I am very happy from progress in Unicode support on Windows.

There is issue describing pending functionality regarding files (http://redmine.ruby-lang.org/issues/show/1685). But I found another important area - opening processes.

This code shows not working (if that file exists, it is not opened by notepad) functions:


# encoding: UTF-8

fname = "củazufälligežluťoučkýგამეორებразлога_和新加坡以及东.txt"

system("notepad.exe #{fname}")
IO.popen("notepad.exe #{fname}")
Open3.popen3("notepad.exe #{fname}")


I tried to open notepad from command line with same parameters and it works.

Best regards
Jarek

PS: I am sorry if I choose wrong fix version...
=end


Related issues

Related to ruby-trunk - Feature #2255: unicode parameters cannot be passed to ruby Assigned 10/22/2009
Related to ruby-trunk - Bug #1685: Some windows unicode path issues remain Closed 06/24/2009
Duplicated by ruby-trunk - Bug #3323: Spawning process on unicode path is not supported on windows Closed 05/20/2010

Associated revisions

Revision 41709
Added by Nobuyoshi Nakada 10 months ago

win32: UTF-8 spawn

  • io.c (spawnv, spawn): use UTF-8 spawn family. [Bug #1771]
  • process.c (procexecsh, procspawncmd, procspawnsh): ditto.

Revision 41710
Added by Nobuyoshi Nakada 10 months ago

win32.c: use backslash

  • win32/win32.c (join_argv): use backslash instead of slash in program path, otherwise cannot invoke "./c\u{1ee7}a.exe" for some reason. [Bug #1771]

Revision 41712
Added by Nobuyoshi Nakada 10 months ago

win32: UTF-8 spawn

  • test/ruby/testprocess.rb (testspawn_nonascii): assertions for non-ascii arguments. [Bug #1771]

History

#1 Updated by Yuki Sonoda almost 5 years ago

  • Assignee set to Usaku NAKAMURA

=begin

=end

#2 Updated by Yuki Sonoda almost 5 years ago

  • Target version changed from 1.9.2 to 2.0.0

=begin

=end

#3 Updated by Usaku NAKAMURA over 4 years ago

  • Status changed from Open to Assigned

=begin

=end

#4 Updated by Usaku NAKAMURA over 4 years ago

  • Priority changed from Normal to High

=begin

=end

#5 Updated by Usaku NAKAMURA almost 4 years ago

  • Category changed from core to M17N
  • Priority changed from High to Normal

=begin

=end

#6 Updated by Yusuke Endoh over 1 year ago

  • Description updated (diff)

Usa-san, what's the status?

Yusuke Endoh mame@tsg.ne.jp

#7 Updated by Yusuke Endoh about 1 year ago

  • Target version changed from 2.0.0 to next minor

Usa-san, what's the status?

Yusuke Endoh mame@tsg.ne.jp

#8 Updated by Nobuyoshi Nakada 10 months ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r41709.
Jarek, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


win32: UTF-8 spawn

  • io.c (spawnv, spawn): use UTF-8 spawn family. [Bug #1771]
  • process.c (procexecsh, procspawncmd, procspawnsh): ditto.

Also available in: Atom PDF