桐原です.
>>>>> というものがあるのを見付けました。default-file-name-coding-systemは
>>>>> shift-jisだけど、OS側はUnicodeを要求しているような予感がします。
>>> 何かこの辺が私も怪しいと思われます.
>> stunnel を呼ぶときに file-name-coding-system を UTF-8 にすれば解決しま
>> すか? Windows だと UTF-16 ですかね?
> なのでEmacsの方を見ないといけないのですが、今はちょっと手を出す気合いが
> 足りていません...すいません。
ということで,
>>> # emacs のソースを追うのは,諦めました….
ちらっと emacs のソースを眺めてみました.
emacs-26.3/src/fileio.c において
5930 DEFVAR_LISP ("file-name-coding-system", Vfile_name_coding_system,
(略)
5934 On MS-Windows, the value of this variable is largely ignored if
5935 `w32-unicode-filenames' (which see) is non-nil. Emacs on Windows
5936 behaves as if file names were encoded in `utf-8'. */);
5939 DEFVAR_LISP ("default-file-name-coding-system",
(略)
5949 On MS-Windows, the value of this variable is largely ignored if
5950 `w32-unicode-filenames' (which see) is non-nil. Emacs on Windows
5951 behaves as if file names were encoded in `utf-8'. */);
とあることから,UTF-8 で決め打ちしてもいいかもしれないです.
# 開発版 (だと思われるもの) でも
#
https://git.savannah.gnu.org/cgit/emacs.git/tree/src/fileio.c
#
https://github.com/emacs-mirror/emacs/blob/master/src/fileio.c
#
# 6225 DEFVAR_LISP ("file-name-coding-system", Vfile_name_coding_system,
# (略)
# 6229 On MS-Windows, the value of this variable is largely ignored if
# 6230 `w32-unicode-filenames' (which see) is non-nil. Emacs on Windows
# 6231 behaves as if file names were encoded in `utf-8'. */);
#
# 6234 DEFVAR_LISP ("default-file-name-coding-system",
# (略)
# 6244 On MS-Windows, the value of this variable is largely ignored if
# 6245 `w32-unicode-filenames' (which see) is non-nil. Emacs on Windows
# 6246 behaves as if file names were encoded in `utf-8'. */);
#
# と (少なくともこれらのコメントは) 変更されていないです.
## ちなみに,エクスプローラで日本語のフォルダーを作成し,
## コマンドプロンプト上で dir し,それを hexdump すると
## shift_jis のコードで表示されました.
## msys2 の bash (LANG=ja_JP.UTF-8) での ls | hexdump は
## (当然) UTF-8 のコードでした.
---
KIRIHARA, Masaharu