On Sun, Mar 28, 2021 at 8:13 PM Yuki Kimoto <kimoto.yuki@gmail.com> wrote: > Does this mean that mkdir can be allowed to pass a string that has UTF8 > flag? > > Currently, I think that the correct behavior of Perl5 is that the bytes > are passed to mkdir. > > For example, bytes means cp932 in windows, or UTF-8 in Mac or Linux/UNIX. > The problem is that the internal Perl storage of the string is passed, which may or may not be the bytes you see in Perl (e.g. using length(), eq, regex, other string operations) depending on operations that Perl users should not care about. So you cannot be certain that the bytes you intended to pass will be used. Further explained in Felipe's recent blog post: https://dev.to/fgasper/use-sys-binmode-4e6o -DanThread Previous