unix-execve and unicode
Helmut Eller
heller at common-lisp.net
Sun Dec 6 20:58:01 CET 2009
* Raymond Toy [2009-12-06 20:23+0100] writes:
> Helmut Eller wrote:
>> The code for unix-execve was apparently not updated for unicode.
>> Maybe something like this could be added:
>>
> Do you have an example where this doesn't work? In unix-execve, there
> is a call to %name->file which is supposed to convert string according
> to the encoding given by *filename-encoding*. This currently defaults
> to nil, so effectively, iso8859-1 is used.
cmucl -noinit -eval '(print (multiple-value-list (unix:unix-execve "/bin/sh" ())))' -eval '(quit)'
Prints (NIL 13) but should just invoke a shell. 13 is "permission
denied" because the "/" followed by zero is passed in.
I also found a simpler solution: changing (* char) to c-string
seems to work.
> The expected way to set the encoding is to call
> set-system-external-format with the desired encoding for the default
> streams and for filename encoding.
Have to try that.
Helmut
More information about the cmucl-imp
mailing list