zsh-workers
 help / color / mirror / code / Atom feed
* zle -U "$selected" doesn't handle (some?) multibyte characters
@ 2016-01-10  8:18 Sebastian Gniazdowski
  2016-01-10  8:40 ` Sebastian Gniazdowski
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Gniazdowski @ 2016-01-10  8:18 UTC (permalink / raw)
  To: Zsh hackers list

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-01-10 20:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-10  8:18 zle -U "$selected" doesn't handle (some?) multibyte characters Sebastian Gniazdowski
2016-01-10  8:40 ` Sebastian Gniazdowski
2016-01-10  9:21   ` Sebastian Gniazdowski
2016-01-10 11:38     ` Sebastian Gniazdowski
2016-01-10 20:51       ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).