[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] svn_cmdline__edit_file_externally() may not be able to open the target file in locale other than UTF-8

From: Jun Omae <jun66j5_at_gmail.com>
Date: Thu, 8 Oct 2020 13:12:26 +0900

Hi all,

On Sun, Oct 4, 2020 at 11:33 PM Yasuhito FUTATSUKI <futatuki_at_yf.bsdclub.org> wrote:
> I commited the v3 patch in 1882234.
>
> I confirmed that on Windows in CP932, both of with and without
> the v3 patch, it cannot pass the file name to edit.
>
> For Windows I confirmed that it can be fixed by using _wsystem()
> with WCHAR string, so I commited it in 1882235.

I found a minor issue on Windows after r1882235.

When the editor command (via SVN_EDITOR environment and --editor-cmd option) has
non-ascii characters, it is unable to launch the editor.

I think we should convert the editor command to UTF-16 encoding before passing it
to _wsystem(), otherwise r1882235 should be reverted.

[[[
C> subversion\svnadmin\svnadmin.exe create C:\usr\tmp\svnrepos

C> mkdir C:\usr\tmp\エディタ

C> copy nul C:\usr\tmp\エディタ\editor-stub.cmd

C> set SVN_EDITOR=C:\usr\tmp\エディタ\editor-stub.cmd

C> subversion\svn\svn.exe propedit svn:ignore file:///C:/usr/tmp/svnrepos
The system cannot find the path specified.
svn: E200012: system('C:\usr\tmp\�G�f�B�^\editor-stub.cmd "svn-prop.tmp"') returned 1

C> subversion\svn\svn.exe propedit --editor-cmd=C:\usr\tmp\エディタ\editor-stub.cmd svn:ignore file:///C:/usr/tmp/svnrepos
The system cannot find the path specified.
svn: E200012: system('C:\usr\tmp\�G�f�B�^\editor-stub.cmd "svn-prop.tmp"') returned 1

C> set SVN_EDITOR=

C> subversion\svn\svn.exe propedit --editor-cmd=C:\usr\tmp\エディタ\editor-stub.cmd svn:ignore file:///C:/usr/tmp/svnrepos
The system cannot find the path specified.
svn: E200012: system('C:\usr\tmp\�G�f�B�^\editor-stub.cmd "svn-prop.tmp"') returned 1

C> subversion\svn\svn.exe propedit --editor-cmd=C:\usr\tmp\エディタ\editor-stubx.cmd svn:ignore file:///C:/usr/tmp/svnrepos
The system cannot find the path specified.
svn: E200012: system('C:\usr\tmp\�G�f�B�^\editor-stubx.cmd "svn-prop.tmp"') returned 1

C> subversion\svn\svn.exe propedit --editor-cmd=C:\usr\tmp\エディタ\editor-stub.cmd svn:ignore file:///C:/usr/tmp/svnrepos
The system cannot find the path specified.
svn: E200012: system('C:\usr\tmp\�G�f�B�^\editor-stub.cmd "svn-prop.tmp"') returned 1
]]]

-- 
Jun Omae <jun66j5_at_gmail.com> (大前 潤)
Received on 2020-10-08 06:12:42 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.