Follow-up to r1887641: Fix file path transcoding around editor invocation.

On r1887641, we use svn_utf_cstring_to_utf8() to transcode the command
line string from native file path on OS into UTF-8. However as svn_utf_
functions are for console/file I/O, it was incorrect and actually it
caused string corruption if editor invocation had failed on Windows
(and perhaps macOS) platform.

With this commit we use svn_path_cstring_to_utf8() and 
svn_path_cstring_from_utf8() for transcoding file paths instead. This
fixes the string corruption above, and also fix potential string
corruption on transcoding temporary filename, which is always ascii
string and safe on encodings we handle in current implementation.

* subversion/libsvn_subr/cmdline.c
  (svn_cmdline__edit_file_externally):
    Use svn_path_cstring_to_utf8 to transcode file paths.
  (svn_cmdline__edit_string_externally):
    Use svn_path_cstring_from_utf8 and svn_path_cstring_to_utf8 to
    transcode file paths.

Found by: jun66j5
Review by: jun66j5
Tested by: jun66j5


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1890013 13f79535-47bb-0310-9956-ffa450edef68
1 file changed