Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ZWJ paste from clipboard problem (unicode)
On Mon, Mar 31, 2025 at 11:23 PM Daniil Rozanov <personal@xxxxxxxxxxxx> wrote:
>
> On Mon Mar 31, 2025 at 11:31 PM +04, Bart Schaefer wrote:
> > On Mon, Mar 31, 2025 at 12:13 PM Daniil Rozanov <personal@xxxxxxxxxxxx> wrote:
> >>
> >> When trying to paste "👩" (U+1F469 U+1F3FB U+200D U+1F9B0) emoji, zsh
> >> prints two emojis and "<200d>" in between.
> >
> > Try "setopt combining_chars"
> >
> > Additional tweaks may be needed if your terminal is using bracketed paste mode.
>
> Thanks! Now it pastes pretty emoji. But now there is another problem,
> which is character's width is more than expected. And with some special
> emojis it works wrong: duplicated display on paste, backspase erases
> kinda parts of emoji instead of remove it all at once. Btw this
> behaviour now is similar to bash.
>
> Maybe zsh has some group of settings which handle unicode?
What you want is not theoretically possible as far as I know.
Combining emojis is optional according to the specs, and zsh has no
way of knowing if a terminal will combine two particular emoji in a
zwj sequence, and thus has no idea how wide the sequence of characters
will be or when the terminal will start drawing on a new line.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author