Norwegian XP - User "Tæst":
` ENV.to_hash
{
"PROCESSOR_ARCHITECTURE"=>"x86",
"HOMEDRIVE"=>"C:",
"CLASSPATH"=>".;C:\Programfiler\Java\jre1.6.0_07\lib\ext\QTJava.zip",
"APPDATA"=>"C:\Documents and Settings\T\221st\Programdata",
"USERPROFILE"=>"C:\Documents and Settings\T\221st",
"TMP"=>"C:\DOCUME~1\TST~1\LOKALE~1\Temp",
"SESSIONNAME"=>"Console",
"ProgramFiles"=>"C:\Programfiler",
"PROCESSOR_REVISION"=>"0d08",
"PROCESSOR_LEVEL"=>"6",
"CommonProgramFiles"=>"C:\Programfiler\Fellesfiler",
"USERNAME"=>"T\221st",
"PROCESSOR_IDENTIFIER"=>"x86 Family 6 Model 13 Stepping 8, GenuineIntel",
"OS"=>"Windows_NT",
"FP_NO_HOST_CHECK"=>"NO",
"windir"=>"C:\WINDOWS",
"SystemRoot"=>"C:\WINDOWS",
"PATHEXT"=>".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH",
"ALLUSERSPROFILE"=>"C:\Documents and Settings\All Users",
"USERDOMAIN"=>"WEEBLE",
"NUMBER_OF_PROCESSORS"=>"1",
"HOMEPATH"=>"\Documents and Settings\T\221st",
"TEMP"=>"C:\DOCUME~1\TST~1\LOKALE~1\Temp",
"SystemDrive"=>"C:",
"QTJAVA"=>"C:\Programfiler\Java\jre1.6.0_07\lib\ext\QTJava.zip",
"Path"=>"C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGRA~1\FELLES~1\SONICS~1\;C:\Programfiler\Fellesfiler\Autodesk Shared\;C:\Programfiler\backburner 2\;C:\Programfiler\Fellesfiler\Roxio Shared\DLLShared;c:\Programfiler\Microsoft SQL Server\90\Tools\binn\;C:\Webdev\MySQL\MySQL Server 4.1\bin;C:\Programfiler\QuickTime\QTSystem\",
"LOGONSERVER"=>"\\WEEBLE",
"ComSpec"=>"C:\WINDOWS\system32\cmd.exe",
"COMPUTERNAME"=>"WEEBLE"
}
TT::System.local_data_path
C:\DOCUME~1\TST~1\LOKALE~1\PROGRA~1
ENV['TEMP']
C:\DOCUME~1\TST~1\LOKALE~1\Temp
File.dirname( ENV['TEMP'] )
C:\DOCUME~1\TST~1\LOKALE~1
TT::Win32.get_folder_path_ansi( TT::Win32::CSIDL_LOCAL_APPDATA )
C:\Documents and Settings\Tæst\Lokale innstillinger\Programdata
TT::Win32.get_short_folder_path_ansi( TT::Win32::CSIDL_LOCAL_APPDATA )
C:\DOCUME~1\TST~1\LOKALE~1\PROGRA~1
path = TT::Win32.get_short_folder_path_ansi( TT::Win32::CSIDL_LOCAL_APPDATA )
C:\DOCUME~1\TST~1\LOKALE~1\PROGRA~1
File.exist? path
true
file = File.join( path, 'test.txt' )
C:\DOCUME~1\TST~1\LOKALE~1\PROGRA~1/test.txt
File.open( file, 'w' ) { |f| f.puts 'Hello World' }
nil
File.exist? file
true
File.size file
13`
PROGRA~1 in the local appdata folder is just a coincidence as the Norwegian work is very similar to English.
C:\Documents and Settings\Tæst\Lokale innstillinger\Programdata
It'd be nice to have this tested on a computer with very different language.