I was puzzled why Dan's workaround actually work. It eventually call
  CreateProcessF=: 'kernel32 CreateProcessA i i *c i i i  i i i *c *c'&cd
but the bytes for ucp 'copy "',fn,'" "',fn2
   3!:3 ucp 'copy "',fn,'" "',fn2
.....
63003a00
5c006a00
36003000
31007400
65007300
74005c00
74006500
6d007000
5c00e600
2e007400
78007400
22002000
22006300
3a005c00
6a003600
30003100
74006500
73007400
5c007400
65006d00
70005c00
61006500
2e007400
78007400
00000000

if this data is interpreted as ansi/mbcs all those nulls will make it fails. Is it J converts unicode to single byte (undocumented?), or CreateProcessA is clever enough?

Björn Helgason wrote:
æ is

00E6
in Unicode


Capital æ is Æ
Æ is

00C6
in Unicode




2007/4/13, bill lam <[EMAIL PROTECTED]>:

I agree with your observation, but when I tried the workaround, it failed
on my
computer,
    shell ucp 'copy "',fn,'" "',fn2
c:\j601test\temp\?txt
The system cannot find the file specified.
         0 file(s) copied.
I believe my window codepage (chinese) does not have this æ character.  I
wish
that the task script can be upgraded to use wchar api to solve the problem
for
all code pages.

Dan Bron wrote:
> I don't know if any of my wonton speculation was right, but I can
reproduce the problem on my system, and applying ucp to the literal passed
to  shell_jtask_  fixes it:
>
>          'iceland' fwrite fn =. jpath '~temp\','.txt',~195 166 { a.
>       7
>
>          fread fn
>       iceland
>
>          require'task'
>
>          shell    'copy "',fn,'" "',fn2=.jpath'~temp\ae.txt'
>       The system cannot find the file specified.
>
>          fread fn2   NB.  Failure
>       _1
>
>          shell ucp 'copy "',fn,'" "',fn2
>               1 file(s) copied.
>
>          fread fn2   NB.  Success.
>       iceland
>
>
> Hope this helps,
>
> -Dan
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>


--
regards,
bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm





------------------------------------------------------------------------

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


--
regards,
bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to