[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Parallel is having trouble handling quotes for unicode characters
From: |
Glen Huang |
Subject: |
Re: Parallel is having trouble handling quotes for unicode characters |
Date: |
Sun, 28 May 2017 17:12:13 +0800 |
I just realize one way to workaround it is to do something like
parallel echo ::: 港 ::: foo
Feel free to ignore the "issue" if you think it's by design.
> On 28 May 2017, at 3:09 PM, Glen Huang <heyhgl@gmail.com> wrote:
>
> Actually just 港 is able to trigger it
>
> parallel echo 港 ::: foo
>
>> On 28 May 2017, at 2:56 PM, Glen Huang <heyhgl@gmail.com> 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.
>>
>>> On 28 May 2017, at 1:03 PM, Glen Huang <heyhgl@gmail.com> wrote:
>>>
>>> Doh, of course. I must be drunk. :)
>>>
>>> Now it's totally clear. Thanks!
>>>
>>> Glen
>>>
>>>> On 28 May 2017, at 12:59 AM, Ole Tange <ole@tange.dk> wrote:
>>>>
>>>> On Fri, May 26, 2017 at 4:44 AM, Glen Huang <heyhgl@gmail.com> wrote:
>>>>> Thanks for the quick reply. Didn't realize {} is already quotes.
>>>>>
>>>>> But if the solution is to not quote {}, how do I pass "${start} {}" as a
>>>>> single argument to subshell?
>>>>
>>>> You are going to say 'Doh, ofcourse' now.
>>>>
>>>>> For example,
>>>>>
>>>>> parallel name=\"foo {}\"';' echo \"'$name'\" ::: 你好 世界
>>>>>
>>>>> would garble the text,
>>>>
>>>> You simply move the {} outside:
>>>>
>>>> parallel name=\"foo \"{}';' echo \"'$name'\" ::: 你好 世界
>>>>
>>>> You still need the space to be quoted.
>>>>
>>>>> And I did get \?\?\?\?\?\? back, as can be seen from this screenshot. I
>>>>> use
>>>>> the terminal app on macOS.
>>>>
>>>> What I meant was: You get two of them. Not just one.
>>>>
>>>>
>>>> /Ole
>>>
>>
>