in reply to Re: Accent file names issue
in thread Accent file names issue

Thank you for your reply. If you look to all these "tricks" you start thinking that perl unicode support (at least for the windows universe) is going in the wrong way. In the old days of codepages, people knew what was going on from the OS itself, perl did not have much to do with it. With all this unicode stuff going into perl string internals, people lost the control and are unable to move on with simple solutions. I have never found such annoying problem, this was not for what unicode was created for.

Look at the pieces of code that people are publishing here... it is madness... simple scripts now have to include weird code like "utf8", "Encode", "Decode", etc (like a secret project) just to handle string variables... I understand the utf8 and other requirements posted here, but this is not the way, really... this is not the old perl glamour I once fell in love... the ç, ã and other latin languages characters are used by thousands of millions, world wide, it's a huge problem and I can't find a simple and elegant solution yet for handling file names. Future developings of perl should change radicaly this, people within latin languages countries will be fed up of perl rapidaly. Unicode handling is dificult, we all know this, but in perl is going nuts.

Sorry if I am exagerating but I am stuck in some projects because of this ridiculous problem. I'm wasting hours of searching tricks instead of working on code.

Replies are listed 'Best First'.
Re^3: Accent file names issue -- Babel Tower
by Discipulus (Canon) on Sep 20, 2017 at 19:49 UTC
    Hello ruimelo73,

    my warmest welcome to the monastery!!

    > it is madness... Unicode handling is dificult.. ridiculous problem..

    welcome to the post Babel Tower era!

    I'm with you: it is difficult but is the reality to be difficult not the Perl way.

    I suggest you a very informative reading: tchrist about Perl and Unicode: No magic bullet (SO)

    You must be patient and laborious to get it right; it's a narrow path but with perl it's possible.

    Many monks here are skilled at this kind of problems (not me) and you can learn a lot from them.

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re^3: Accent file names issue
by holli (Abbot) on Sep 20, 2017 at 19:05 UTC
    perl6 -e '$_ = "/bäçelor"; mkdir $_ or die $!; say .IO.d && .IO.e' True


    holli

    You can lead your users to water, but alas, you cannot drown them.

      In the original post I mention that passing the value of the string throught the arguments or other means similar, that do not envolve a direct setting of the string, will work. Your code...

      perl6 -e '$_ = "/bäçelor"; mkdir $_ or die $!; say .IO.d && .IO.e'

      ...will work with me also.

      The problem is within the direct setting of the string variable and then doing a -d testing. I know that it is hard to get it, but that is what I'm dealing with, not just in one computer or one version of perl, but diferent computers, and diferent perl versions, all in the Windows context.

      Again, I am sure that there is a solution for the problem, but it will require lines of code that elevate all the situation to a ridiculous level. It just characters, it should not be necessary to deal with this confusion.

      A friend of mine is joking about this saying that it will be necessary to create a Win32::PtUnicodePoo to help all portuguese perl programmers.

      Even so, thank you for your reply.