Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6016341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:58:07+00:00 2026-05-23T02:58:07+00:00

Here is an excellent question and the wonderful tchrist ‘s answer with 7+24+52 advices&comments

  • 0

Here is an excellent question and the wonderful tchrist‘s answer with 7+24+52 advices&comments how to make an perl program utf8 safe.

But here is 19k CPAN modules. What is possible to do for differentiating “good” and “bad” ones? (from the utf8’s point of view)

For example: File::Slurp if you will read the file with

#use strict encoding warnings utf8 autodie... etc....
my $str = read_file($file, binmode => ':utf8');

you will get different results based on command line switches, and perl -CSDA will not work. Sad. (Yes, i know than Encode::decode(“utf8”, read_file($file, binmode => ‘:raw’)); will help, but SAD anyway.

My questions:

  • is here any preferred way, how to test/classify what CPAN modules are utf8 safe/ready/correct?
  • is here some Test::something already done for utf8 testing?
  • is here something like Perl::Critic for utf8 – what will check the module source for possible utf8 incorrectness? (because manually checking sources for 7+24+52 things i cannot classify as the “easy way to programming”)
  • or any other way? 🙂

I understand, than much of CPAN modules simply does not need to know about utf8. But here are zilion others what should.

Please, don’t misunderstand me. I love Perl language. I know than perl has extremely powerful utf8 capability. (especially 5.14). The above was not mean as perl critique – but me (and probably some others too) need to know what CPAN modules are OK, and how classify them…)

When doing development using several CPAN modules, and initially everything goes well but in the final testing, you find that some modules does not support utf8, and therefore part of your work is useless – that really can cause a bit disillusionment. 🙁

Edit:

I understand than all complicated things around the unicode has two roots:

  1. unicode itself – as tchrist excellently analyzed some of problematic points
  2. perl – simple can’t break all working modules, live servers etc – so need maintaining backward compatibility.

My only hope: perl6. Is is an totally new and different language. Don’t need maintaining any backward compatibility. So I hope, in perl6 will be default some things what is not possible do in perl5 and all utf8 things will be much more intuitive.

But, back to modules: @daxim told: “Authors won’t even reveal whether their module is taint-safe, and this feature exists for decades!” – and this is a catastrophe. Maybe (big maybe, and honestly haven’t idea how to do it), but maybe we arrived to the time, when need put much-much harder restrictions into CPAN submissions.

At one side i’m really very happy with volunteer works of CPAN authors. At the other side, publishing source code is not only like a free speech “right” – but should obey some rules too.

I understand, than is is nearly impossible make any “revolution”, but we probably need some “evolution”. Maybe flag any CPAN module what is not utf8 safe. Flag all what are not taint safe. Flag (like here in SO) what module does not meet the minimal coding standards and remove them. Maybe I’m an idealist and/or naive. 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T02:58:07+00:00Added an answer on May 23, 2026 at 2:58 am

    Chill, the situation is less dire than you’re thinking. No one except tchrist operates on this level of Unicode correctness, also see Aristotle’s recent commentary. As with all things, you get 80% of the way with 20% of the effort. This base effort, namely getting the topic of character encoding right, is well documented; and jrockway repeats it in his answer in that thread.

    Replies to your specific questions:

    1. No, there isn’t. There is no concerted effort to collect this information in a central place. The Perl 5 wiki could be used to document problematic modules, Juerd already discusses some in uniadvice. I would really like to see a statement from each module author in their documentation that “this module DTRT w.r.t. encoding”, but I don’t see it happening. Authors won’t even reveal whether their module is taint-safe, and this feature exists for decades!

    2. encoding::warnings can be used to smoke out unintended upgrades. I mention it in the work-flow of Checklist for going the Unicode way with Perl

    3. You can’t do that with Perl::Critic or static analysis. I see no other way than knowledgable people poking at the module with pointy characters until it falls apart (or not), like mirod just commented.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After exploring the very excellent answer from Heike to my previous question about anamorphic
Ok, I asked this question and got excellent code example as answer. The code
In my previous question I got an excellent answer that helped me detect where
Really simple question here. After watching an excellent introduction to lenses: http://www.youtube.com/watch?v=efv0SQNde5Q I thought
We use the excellent validator plugin for jQuery here on Stack Overflow to do
My registering here is a strong testimony to the excellent answers I've found here
I've been reading Alejandro Gervasio's excellent Service Layers series here: http://www.devshed.com/cp/bio/Alejandro-Gervasio/ and I noticed
Trying to implement the excellent jQuery bidirectional infite scroll as explained here: http://www.bennadel.com/blog/1803-Creating-A-Bidirectional-Infinite-Scroll-Page-With-jQuery-And-ColdFusion.htm For
Thanks to the help of some most excellent members on here I have learned
In the excellent series of articles here: http://www.tonyamoyal.com/2010/07/28/rails-authentication-with-devise-and-cancan-customizing-devise-controllers/comment-page-2/#comment-908 he explains a bit about how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.