From: "Peña, Botp" Date: 2007-02-01T14:06:28+09:00 Subject: ENV problem getting userid/profile in windows (was RE: [ANN] FastRI 0.3.0: standalone mode (qri, DRb not needed), additional search methods, extended class info) From: self :) # From: Mauricio Julio Fern�ndez Pradier : # # Does the C:\Documents and Settings\pe�aijm directory exist? # # (maybe a problem with the e�e?) # # verified, it's the e�e alright. I logged in using a simple # userid, it works. On another pc, i used a different folder # dir, just the root C:\, and it also works. # # but i really would hope that there is a possible fix for this # since i and some of us here have e�e on their names/loginid. # Is ruby mungling the e�e-ed text? arggh, I find discrepancy bw ruby and mswindows env vars :( C:\family\ruby>cat test.rb # environ tests p "---ENV['USERPROFILE']---" p ENV['USERPROFILE'] #p Dir.entries ENV['USERPROFILE'] # <-----THIS ERRS !! p Dir.entries('C:\\Documents and Settings\\pe�aijm') #<-- this is fine C:\family\ruby>ruby test.rb "---ENV['USERPROFILE']---" "C:\\Documents and Settings\\pe\244aijm" [".", "..", "#test.rb#", "#test.txt#", ".irbrc", ".irb_history", ".java", ".jedit", ".jpi_cache", ".plugin140_01.trace", ".plugin141_01.trace", ".tm econsole", ".vimrc", ".vimrc~", ".wgetrc", ".zsh_history", "1151730757-oem 30.inf", "1151730757-oem30.PNF", "1151730757-oem31.inf", "1151730757-oem31 .PNF", "1151730757-oem32.inf", "1151730757-oem32.PNF", "1151917885-oem30.i nf", "1151917885-oem30.PNF", "1151917885-oem31.inf", "1151917885-oem31.PNF ", "1151917885-oem32.inf", "1151917885-oem32.PNF", "1170304489-oem3.inf", "usbsermptxp.sys", "USB_CMCS_2000.INF", "USB_MOT_A1000.INF", "USB_MOT_BRIT. INF", "UserData", "vimfiles", "wengo", "WINDOWS", "WinVNC.log", "yaml", "y aml.1", "yaml.2", "yaml.3", "zshrc", "zshrc_old", "zshrc~", "_viminfo"] Is there other way to get the userid in windows without going thru ENV? Maybe, some spanish ruby hackers have some ideas here.. kind regards -botp