I'm using macOS. I tried using the following command to paste from clipboard in Emacs(started with emacs -Q
)
(call-process "/usr/bin/pbpaste" nil t nil)
It works fine for English characters, but not for Chinese characters. For example, if I copy the following Chinese characters in web browser
中文测试
Then run the call-process
command above in Emacs, the result would be
????
My system encoding is UTF-8 and I checked Emacs' encoding system was UTF-8 too(By checking the value of buffer-file-coding-system
in Emacs, which was 'utf-8
).
How to sovle the problem?