Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Pragma to handle unicode characters

by Anonymous Monk
on Dec 22, 2008 at 08:42 UTC ( [id://731992]=note: print w/replies, xml ) Need Help??


in reply to Re: Pragma to handle unicode characters
in thread Pragma to handle unicode characters

Most things answered fellow Almut to you and to others practically the way i think, so thank you Almut. In one aspect i want still point:
(That actually happened once, with the introduction of Perl 5.8.0 on RedHat Linux: the particular RedHat release used utf-8 locale settings for the "default" shell environment, and that version of Perl used the locale settings in order to decide what the default i/o layer should be.
If those scripts were broke after making locale spread default, those script were buggy, right? No one should use locale pragma if they don't mean it, right?
  • Comment on Re^2: Pragma to handle unicode characters

Replies are listed 'Best First'.
Re^3: Pragma to handle unicode characters
by graff (Chancellor) on Dec 22, 2008 at 18:23 UTC
    You misunderstood the situation. The victims of the problem never intended to use locale information in any way in their scripts, and the scripts were not written to use locale information. It just suddenly turned out (when the script was run on that particular RedHat release with that particular Perl version) that the use of locale information was imposed on them as "the new default" -- and many of them couldn't figure out why their scripts were suddenly failing until they turned to the community for help.

    "Oh, you need to change your shell environment so it doesn't use the new default utf8 locale, and/or you need to change your existing perl scripts..."

    As a rule, if you want to build some new functionality into a tool, and this is incompatible in some way with previous functionality that has an established base of users, it's better not to require that those established users change all their code for the sake of the new feature (which they might not have wanted in the first place).

      You misunderstood the situation. The victims of the problem never intended to use locale information in any way in their scripts, and the scripts were not written to use locale information.

      Can you point me to this problem? Seems, i don't understand it throughly. My problem is that i can't rely on system locale even i use locale pragma. As far i understand, those victims were dependent of their system locale even without using locale pragma? Was it like this?

      I agree, that such behaviour will break earlier code and such move needs long time to adapt before any deprecation (if needed). I need the middle way: locale does not spread without using pragma, but when using it, it should flawlessly spread.

      Nġnda, WK

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-04-24 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found