Re: rename not working on files with accents in names



Chris Mattern wrote:

> Tom Bates wrote:
>
>> Thanks for reminding me about being able to see the actual error info
>> (I referred to the Perl help pages for the available error variables).
>> After the rename fails:
>>
>> $! == "No such file or directory"
>> $^E == "The system cannot find the file specified"
>> $? == 0
>>
>> I have many files with other accented characters that cause the same
>> problem, BTW. I'm just using this one to narrow down the problem.
>
> Please don't top-post. Put your reply after the text you are replying
> to. That said, I firmly believe that your problem is that your Perl
> program and Windows aren't using the same character set--that is,
> "á" in your Perl program and "á" on your command line aren't in fact
> the same character. As I very rarely need to fool with non-ASCII
> character sets, I'll leave your solutions to somebody who understands
> them better.

It occurs to me that there is a simple test for this. Have your
Perl program create "Tecatitlán.txt". Then look at the file
in Windows. If it has a weird character instead of "á", then
that's your problem.

--
Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"
.



Relevant Pages

  • Re: Oracle error with swedish characters
    ... i have the problem running perl to oracle on linux only. ... machine was just a test to see if it was a greater perl problem. ... works on windows i am now trying to get perl DBI to work only on linux. ... > oracle the character mentioned is ascii 229. ...
    (perl.dbi.users)
  • Re: change web page,open programs
    ... Perl is case sensitive but the Windows file system is not, and so, although when you look for the file 'LWP/Simple.pm' as 'lwp/simple.pm' Windows will "find" it that will not work in Perl because perl looks for the module name 'LWP::Simple'. ... perl interpolates strings What this means is that the backslash character is treated differently in most strings in that it, and the character following it, are either translated to a "special" character, or if there is no "special" character then it is translated to the character itself. ...
    (perl.beginners)
  • Window control program help needed Jan. 24, 2006
    ... If possible I would like to get Perl to do two things. ... I would like Perl to send characters etc. to the Windows operating ... system as if the instructions were being entered from the keyboard. ... window is active for example and I enter a character on the keyboard, ...
    (comp.lang.perl.misc)
  • How to match carriage returns and line feeds
    ... I am using ActiveState's Perl on Windows and am trying to remove an excess ... \x0d character I am getting (not sure why I am getting it, ... I admit to being a newbie to Perl, so maybe I am just missing something. ...
    (comp.lang.perl)
  • Re: to X, or not to X...
    ... layer that would allow pixel-mode windows to be created as part of its ... X11 terminals, provided that the system is using something like the vesa ... Character mode window managers do exist for UNIX-style systems, ...
    (comp.os.linux.x)