Thanks for the detailed explanation.

> On 31 May 2017, at 1:17 AM, Ole Tange <[email protected]> wrote:
> 
> On Sun, May 28, 2017 at 8:56 AM, Glen Huang <[email protected]> wrote:
> 
>> I'm sorry, but I think I just found another strange case:
>> 
>> parallel echo 芦港 ::: foo
>> 
>> fails with "parallel: Error: Command cannot contain the character ?. Use a 
>> function for that."
>> 
>> in which case I didn't quote anything.
> 
> As you probably are aware unicode characters are multibyte characters.
> GNU Parallel internally uses \257 for placeholder of replacement
> strings.
> 
> Outside unicode \257 is rarely (if ever) used on the command line.
> 
> In theory it _is_ possible to make GNU Parallel deal correctly with
> all characters, but so far no one has submitted a patch or been
> willing to pay for the development.
> 
> The workaround (as GNU Parallel tells you) is to use a function:
> 
> myecho() {
>    echo 芦港 "$@"
> }
> export -f myecho
> parallel myecho ::: foo
> 
> This also works if you have variables:
> 
> myvar="foo芦港 "
> export myvar
> myecho() {
>    echo "$myvar" "$@"
> }
> export -f myecho
> parallel myecho ::: bar
> 
> 
> /Ole


Reply via email to