4

I encounter a problem,

I want to mount a shared remote directory, but the url has Chinese characters.

mount_smbfs //user:[email protected]/图片 /Volumes/picture

图片 are Chinese characters, which mean picture in English.

When I execute this command, I get below error:

mount_smbfs: URL parsing failed, please correct the URL and try again: Invalid argument 16384

I can confirm it is caused by the Chinese character, because I can execute below command:

mount_smbfs //user:[email protected]/hehe /Volumes/picture

Both hehe and 图片 are remote shared directories.

1 Answer 1

2

Try escaping the unicode

图片 translates as %E5%9B%BE%E7%89%87 using an escape function I found online at http://www.url-encode-decode.com

The app UnicodeChecker installs a service which can convert any unicode character string into percent escapes.

See https://stackoverflow.com/questions/912811/what-is-the-proper-way-to-url-encode-unicode-characters for a reference.

1
  • Thank you both. It works. The Chinese characters should be encoded before sent. It can also be done by python command urllib.parse.quote('图片')
    – xuanzhui
    Commented Feb 9, 2015 at 14:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .