Gosi,
I'm ignorant of character encodings, but my initial suspicion is that the
problem is (A) the second character in 'æ' is a pipe, which is special to
cmd.exe and (B) the utilities in the task script are using the A-style API
calls (ascii), rather than the W-style API calls (wide characters).
So,
copy "C:\CTDI\mars2007\UNFORS\ctdi mælingar.xml"
"c:\j601\user\CTDI\UNFORS\ctdi mælingar.xml"
gets interpreted as:
copy "C:\CTDI\mars2007\UNFORS\ctdi mÃ" ¦ "lingar.xml"
"c:\j601\user\CTDI\UNFORS\ctdi mælingar.xml"
with the consequences you observed.
On the other hand, cmd.exe itself knows (probably from your localization
settings) to interpret 'æ' as a single character and so interprets the command
without trouble.
The easiest solution I can suggest is to write your copy commands to a batch
file (a file with a .bat extension) and use shell to execute the batch file
(instead of the individual commands). Make sure to use only ASCII characters
in that batch file name. Also make sure to delete it when you're done.
Other routes to try, in increasing order of complexity: try applying
(combinations of) utf8 and ucp to your commands before you pass them to
shell . Try using the (W-style) CopyFile API call instead of copy commands
(see the winapi script). Try converting the task script to use the W-style API
calls.
-Dan
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm