I'm occasionally calling emacsclient ... vm-mail-to-mailto-url ...
from scripts. It works fine for simple mailto:user@domain URL:s. But if the URL also includes some non-ASCII, e.g. in a subject= argument, then this string gets mangled. More exactly, the UTF-8 encoded character in the string gets treated as multiple single characters. If I understand things correctly, this boils down to vm-url-decode-buffer doing the decoding in that way. It looks for one %XX escape, and does insert-char on the decoded value. That makes a UTF-8 sequence consisting of more than one byte become several characters. Has anyone else been hit by this or something similar? And, in particular, has anyone any idea how to fix the problem?