Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Files with arabic names

by Corion (Patriarch)
on Jul 13, 2017 at 18:52 UTC ( [id://1195067]=note: print w/replies, xml ) Need Help??


in reply to Re: Files with arabic names
in thread Files with arabic names

This is only true if the character encoding used is the same between Perl and the other process(es) showing the files.

On Unixish systems, filenames are opaque blobs of octets and all interpretation of them as UTF-8 octets is solely by convention.

On Windows systems, filenames are encoded as wide characters (UTF-16) and you have to use the Wide APIs to access/delete them. If your filenames are encoded as UTF-8, you have to change their encoding to UTF-16 when talking to the Windows API.

Win32::Unicode helps there.

Replies are listed 'Best First'.
Re^3: Files with arabic names
by 1nickt (Canon) on Jul 13, 2017 at 18:56 UTC

    Well, the OP was rather vague about where the filenames were, and his real issue is character encoding, not deleting files, don't you think? That's what I was attempting to point out.


    The way forward always starts with a minimal test.
    A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1195067]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-26 07:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found