If I want do this with python,the code just like :
#!usr/bin/python
import os
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
path = 'H:\\Dolly. - 。.〆bear小熊-葉鏗然-ω·)~☆ぼんじ'
print(path)
os.mkdir(path)
but I try use perl,it does not work.
#!/usr/bin/perl
use File::Path;
use utf8;
path = 'H:\\Dolly. - 。.〆bear小熊-葉鏗然-ω·)~☆ぼんじ';
make_path(path );
Unfortunately, Perl is really bad at supporting Windows. In this case, this is partly due to Perl considering file names to be opaque strings of bytes rather than text. As such, the builtins don’t use the (W)ide interface calls, so you are limited to your system’s “(A)NSI” encoding. On most machines, thats’s cp1252.
Win32::FindFile provides an interface to
CreateDirectoryWunder the nameCreateDirectory.Untested, but I’d be surprised if it doesn’t work.