Describe the bug
os level copied e.g 啊 (a chinese word), reg + or * is \u554a and displayed as it too.
To Reproduce
Detailed steps to reproduce the behavior:
啊 at os level.\u554aExpected behavior
displayed as 啊
Environment (please complete the following information):
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 5 2021 09:28:13)
Included patches: 1-3290
Compiled by shane@shanesmbxpro
Huge version with GTK3 GUI.
ubuntn 20.04
xterm
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.![]()
is this in the terminal? Perhaps it's just the font that cannot display that character.
Perhaps it's just the font that cannot display that character.
looks not, since if pasted by 'ctrl-shift-v' (when in vim insert mode), then it displayed correctly which is 啊.
I can't really reproduce this on my Linux system. I copy/pasted 啊 using the exact steps you mentioned, and it works well for me.
What are your locale settings? Maybe it's a locale issue somehow? You can usually find them with the locale command.
And just to be absolutely sure, you're using Vim inside xterm, and not gVim?
What locale are you using? Try run locale and check if your locale is setup correctly. With LANG=C I can reproduce this issue.
Where are you copy/pasting it from? As in, which application? Maybe that affects things?
looks not, or e.g 'mousepad' if you like to know.
What are your locale settings?
LANG=en_HK.UTF-8
// and of course, it is Tui vim.
I can reproduce it with LANG=C, both when copying from Firefox and Mousepad, but not with LANG=en_HK.UTF-8: that always seems to work correct as far as I can see.
Are you sure your locale is set up correctly? Does the locale command show any errors?
i think my locale is correct, and no error showed.
LANG=en_HK.UTF-8
LANGUAGE=en_HK:en
LC_CTYPE="en_HK.UTF-8"
LC_NUMERIC="en_HK.UTF-8"
LC_TIME="en_HK.UTF-8"
LC_COLLATE="en_HK.UTF-8"
LC_MONETARY="en_HK.UTF-8"
LC_MESSAGES="en_HK.UTF-8"
LC_PAPER="en_HK.UTF-8"
LC_NAME="en_HK.UTF-8"
LC_ADDRESS="en_HK.UTF-8"
LC_TELEPHONE="en_HK.UTF-8"
LC_MEASUREMENT="en_HK.UTF-8"
LC_IDENTIFICATION="en_HK.UTF-8"
LC_ALL=
What does Vim answer to
:language :verbose set encoding?
See also https://vim.fandom.com/wiki/Working_with_Unicode
and remember that the right place to set 'encoding' is in your vimrc, before any editfile has been loaded.
Best regards,
Tony.
tony, i ran with 'vim --clean', and the 'encoding' is 'utf-8'.
when the locale is:
LANG=en_US.UTF-8
LANGUAGE=en_HK:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_US.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=
// i cannot reproduce it IF the locale is like above.
// the + and * both is 啊.
however then change the locale LANG=en_HK.UTF-8 :
LANG=en_HK.UTF-8
LANGUAGE=en_HK:en
LC_CTYPE="en_HK.UTF-8"
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE="en_HK.UTF-8"
LC_MONETARY=en_US.UTF-8
LC_MESSAGES="en_HK.UTF-8"
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=
// now then the + or * both or one of them is \u554a.
so the territory would be the problem ?!
so the only differences in territory is for LANG, LANGUAGE and LC_MESSAGES , LC_COLLATE and LC_CTYPE. can you find out which one is responsible? Or just leave it at en_US.UTF-8
i think it is lc_ctype, however perhaps normally it should be same value like lang.
// the territory of lc_ctype somehow looks it is the problem.........................................
i think it is
lc_ctype, however perhaps normally it should be same value likelang.// the territory of lc_ctype somehow looks it is the problem.........................................
是不是在iTerm2下打开的vim呢?我刚刚也遇到了这个问题,但是用terminal打开vim,再输入汉字就没问题,感觉大概率是iTerm2的问题😢
~/.vimrc中添加了这个就可以了 囧rz
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936Closed #8706 as completed.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()