I expect that none of you really care about this or will run into this problem, but y'all were so helpful as I wandered on my fool's errand I'd like to share the end result of it. You might be amused at the way I got rid of the Unicode characters.. :o)
#!/usr/bin/perl # Remove the Unicode characters from file names # $Id: removeunicode.pl 1.2 2023/01/07 00:21:49 bernie Exp $ use v5.10 ; use strict; use warnings ; use Getopt::Std ; # getopts(<flags>, \%args) ; my %args ; use Win32::LongPath ; getopts("v", \%args) or Usage(); sub Usage { die "Usage: removeunicode [-v] <DIR>\n" ; } my $dir = $ARGV[0] ; Usage() unless $dir ; chdir $dir or die "can't connect to $dir: $!\n" ; trace("connected to $dir") ; my $d = Win32::LongPath->new() ; $d->opendirL(".") or die "Can't open $dir: $!\n" ; for my $file ($d->readdirL($d)) { my $fixedfile = sanitize($file) ; next if $fixedfile eq $file ; # No unicode this filename trace("working on $file") ; trace("changing to $fixedfile") ; renameL($file, $fixedfile) or die "didn't rename! $!"; } exit ; #Remove all the unicode characters from a string sub sanitize { my $unicode = $_[0] ; my $ascii ; for my $char (split(//, $unicode)) { $ascii .= $char if ord($char) < 256 } return $ascii; } sub trace { say $_[0] if $args{v} }

In reply to Re^3: Contacting the author of a module? by BernieC
in thread Contacting the author of a module? by BernieC

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.