gum icon indicating copy to clipboard operation
gum copied to clipboard

encoding issue

Open lost22git opened this issue 3 years ago • 4 comments

Run on powershell

--placeholder='请选择颜色'

$s=@('黑色','白色','红色','蓝色') | gum filter --no-limit --placeholder='请选择颜色' | Where {$_ -notmatch 'failed'}

image

and filter text can not input unicode chars

lost22git avatar Nov 17 '22 12:11 lost22git

If i add --placeholder=' 请选择颜色🤔' with <space> as prefix, it can show correctly.

image

But filter text still can not input unicode chars 🤔

lost22git avatar Nov 17 '22 12:11 lost22git

I tried to reproduce this on linux, and the results are the same. Characters are not rendered unless a leading space is added.

This seems to be a problem in bubbles, caused by the multi-codepoint glyphs you're using. I'll try to get a pr to bubbles soon.

rm-dr avatar Jan 19 '23 04:01 rm-dr

As for input, how are you trying to input characters to the prompt? This may be a problem with powershell and not gum, since table-based keyboard layouts (like chinese via pinyin) don't work in all applications.

Copy-pasting chinese characters into the filter bar works perfectly well.

rm-dr avatar Jan 19 '23 04:01 rm-dr

As for chinese pinyin input, fzf works well. so maybe not a problem of powershell.

lost22git avatar Jan 19 '23 05:01 lost22git