On Thu, Sep 12, 2013 at 4:41 PM, Andreas Schwab <address@hidden
> Haoyang Xu <address@hidden
> > Although this works for whitespaces and maybe some other characters (and I
> > don't know why), the resulted string will have _two_ escape characters in
> > front of every Chinese character.
> No, it doesn't.
> > $ ls ~/Dropbox/Office\ Work/\\参\\考\\资\\料/
> This is not what shell-quote-argument returns.
> ELISP> (shell-quote-argument "~/Dropbox/Office Work/参考资料/")
> "\\~/Dropbox/Office\\ Work/\\参\\考\\资\\料/"
> There is only one backslash before each quoted character.
You are again right :) My bad, I didn't set my environment properly. I need to ensure Emacs send the arguments to shell in UTF-8 coding, by either
(setq default-process-coding-system '(utf-8 . utf-8))
Then it works.
Sorry for letting you chase the ghost. Please accept my apology and thanks.
> Andreas Schwab, SUSE Labs, address@hidden
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."