Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zle -U "$selected" doesn't handle (some?) multibyte characters
- X-seq: zsh-workers 37536
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: zle -U "$selected" doesn't handle (some?) multibyte characters
- Date: Sun, 10 Jan 2016 09:18:38 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=rinICkBTuhUPVtJijLqF3WUnR7wAC58O+K2/pFPxVNo=; b=HUks/9rVsl+TTPo1Jk6hN09tlBY8ePvIL6Ic69dbPABllKZ7M1qMBCyfSeKPIMJagi EwsjitnARz9uGvdKdC3EQGuuQH1V6D79f/x/+iCXaHLNQCcAy8ZyyG8MovE3d7t1J+gK nURv/Z5tv+Kqnmd3baXRW/uC3ZJYTekiyXXqZQACdQD8GWb6LKoQlztz6s2+hQm7gKgw GgF+674yNEoC1N1AijTw7wzBPK5GQ5MRMXe+scpewiZCLhn6cb+4aWf2mCC7jK6a0sBw tzD3qpXAL90BU8cz4fATbasrYIS7r18zTLLu3+Pdwsii2p3oMEwHLhQbcFUnObd9Fp+b PqJw==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
I have a following code in which "$selected" resolves to "The\ Voice\
of\ Poland\ VI\ –\ Marta\ Moszczyńska\ –\ „Sail”\ –\
Live-h9KgwUAlCjE.mkv":
if [ "$REPLY" -gt 0 ]; then
selected="$reply[REPLY]"
echo "$selected" > /tmp/d
# ZLE?
if [ "${(t)CURSOR}" = "integer-local-special" ]; then
zle redisplay
zle kill-whole-line
zle -U "$selected"
else
print -zr "$selected"
fi
else
[ "${(t)CURSOR}" = "integer-local-special" ] && zle redisplay
fi
So two paths, one for the script being run from Zle, and other one
when run as function. The function path works, string is not
disrupted. The "echo" also outputs non-disrupted string. However, zle
-U "$selected" outputs: "The\ Voice\ of\ Poland\ VI\ \ Marta\
MoszczyŃska\ \ Sail \ \ Live-h9KgwUAlCjE.mkv"
The quotation marks are missing. The letter "ń" is also disrupted and
outputted as "Ń"
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author