SPUG: unicode filename problems

Yitzchak Scott-Thoennes sthoenna at efn.org
Thu Mar 23 15:30:43 PST 2006


On Thu, Mar 23, 2006 at 04:58:27PM -0600, jlb wrote:
> I'm trying to create filenames that contain some particular unicode 
> characters.  The code I've written to do so work fine on the FreeBSD and 
> Linux machine I'm using, but doesn't work the same way under ActiveState 
> Perl.

I'm not all that familiar with the precise details, but here's my
understanding:

Basically, windows presents 2 versions of many api functions, one that
deals only with 8-bit characters using some kind of current locale,
and one that uses UTF-16 or UCS-16 (I've never been quite sure which).
MSWin32 builds of perl use only the former.  There used to be a way to
switch at least some of the calls using the -C switch or setting a
${^WIDE_SYSTEM_CALLS} (sp?) variable, but either the code got a little
broken with the introduction of utf8 support in perl or it never was
completely working or both, and it has been removed.

I know this question has come up from time to time, and it may be
possible to use unicode filenames via Win32API::File or similar.  I'd
recommend you ask on
http://perlmonks.org/?node=Seekers+of+Perl+Wisdom.


More information about the spug-list mailing list