Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!perl use utf8; use strict; use diagnostics; use Win32API::File 0.08 qw(:ALL); print "$Win32API::File::VERSION\n"; # 0.10 #createFile('abc.txt'); # system cannot find specified file #createFile('C:/abc.txt'); # system cannot find specified file #createFile('//?/C:/abc.txt'); # network path was not found CreateFileW('䏿–‡.txt', GENERIC_WRITE, FILE_SHARE_READ, +[], CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); print "last err: $^E\n";
Using the three outcommented calls gives me the errors noted in the comments. They are retranslated into English, so they are not 100% properly named.
Using the last call (what is looks like unmolested by PM: CreateFileW('䏿–‡.txt', ...) actually creates a file (empty error message), only I expect the filename 中文, but actually get the name 룤螖琮瑸Ā峘ŝ. As before, this is on NTFS in Windows 2000.
Help me, Obi-tye Kenobi! You are my only hope.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unicode in filenames (part 2)
by Thelonius (Priest) on Mar 21, 2006 at 01:39 UTC | |
by Anonymous Monk on Mar 21, 2006 at 08:41 UTC | |
by Thelonius (Priest) on Mar 21, 2006 at 14:02 UTC | |
by dsully (Acolyte) on Mar 21, 2006 at 15:48 UTC | |
|
Re: Unicode in filenames (part 2)
by diotalevi (Canon) on Mar 21, 2006 at 01:41 UTC |