This is a first step in the creation of an All-To-UTF-8 type Perl module. I've spent some time researching the possibility of using something already available to accomplish this task -- plow through a directory of text documents of UNknown encoding/charset recursively, and accurately detect their encoding/charset, and reliably convert them to utf-8.

Yes. But what if their not correctly defined, in the first place?
Well. Unless I can figure out a better solution. It's garbage in, garbage out.
No harm done. It wasn't right in the first place. So would have been/ become mojibake anyway.

While I recognize that Perl is said to be (very?) good at handling this sort of thing. My personal experience, and judging by other nodes here at PM, indicates there is room for improvement. It is not my intention to "fix Perl" in any way. But rather, create a module that will "ease the pain" often encountered doing such things.

This is a formal solicitation for comments, examples, and recommendations for accomplishing this task. Thus far, I have carefully looked at perlmod, Encode, Encode::Detect, Encode::Detect::Dector, Encode::Encoding, Encode::Guess Encode::Unicode -- OH, and Bush hid the facts
Any other suggestions for research? Anyone already have a method that accomplishes this task? An example of a possible solution?

Well. In summary. At this point, I'm attempting to find the best solution to detecting, in the best possible manner, the current/actual encoding/charset of a document. Methods for the actual conversion will come in a different node/thread. At a later time. :)

Thank you for all your consideration.

--Chris

UPDATE: Just a thanks to Your Mother, and moritz. For some hints
Yes. What say about me, is true.

In reply to How best to avoid mojibake, when attempting to automatically convert documents to utf-8? by taint

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.