Win32::Unicode.pm - perl unicode-friendly wrapper for win32api.
use Win32::Unicode; use utf8; # unicode console out printW "I \x{2665} Perl"; # unicode file util unlinkW $file or dieW errorW; copyW $from, $to or dieW errorW; moveW $from, $to or dieW errorW; file_type f => $file ? 'ok' : 'no file'; my $size = file_size $file; touchW $new_file; # unicode directory util mkdirW $dir or dieW errorW; rmdirW $dir or dieW errorW; my $cwd = getcwdW; chdirW $change_dir; findW sub { sayW $_ }, $dir; finddepthW sub { sayW $_ }, $dir; mkpathW $long_path_dir_name; rmtreeW $tree; cptreeW $from, $to mvtreeW $from, $to; my $dir_size = dir_size $dir; # opendir my $wdir = Win32::Unicode::Dir->new; $wdir->open($dir) || die $wdir->error; for ($wdir->fetch) { next if /^\.{1,2}$/; my $full_path = "$dir/$_"; if (file_type('f', $full_path)) { # $_ is file } elsif (file_type('d', $full_path)) # $_ is directory } } $wdir->close || die $wdir->error;
Wn32::Unicode is a perl unicode-friendly wrapper for win32api. This module many functions import :P.
Many features easy to use Perl because I think it looks identical to the standard function.
Switch Win32::Unicode::Native.
use Win32::Unicode '-native'; # eq use Win32::Unicode::Native
Yuji Shimada <xaicron@cpan.org>
Win32::Unicode::Console Win32::Unicode::Dir Win32::Unicode::File Win32::Unicode::Error Win32
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Win32::Unicode, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32::Unicode
CPAN shell
perl -MCPAN -e shell install Win32::Unicode
For more information on module installation, please visit the detailed CPAN module installation guide.