My file format isn't exactly like what I gave earlier, but I don't think the difference is significant in this case. I'm doing some tag reductions and reformatting to prepare it for DB insertion, and there was no sense in posting all of the bloat here.

I'd tried something before that had given me the results to be obtained by your line:

$asText =~ s!\\x(..)!chr(hex($1))!ge;

However, using that in conjunction with the subsequent "decode" process did the trick! I guess it required that specific TWO-STEP conversion process, and all of my attempts had stopped at one--at least within my code's conversion, not counting setting the file encodings on reading and writing. I'm no stranger to encoding issues, but hadn't worked with these slash-x octets before (I don't even know what they're supposed to be called), and these really threw me for a loop.

So, THANK YOU so much!

Blessings,

~Polyglot~


In reply to Re^4: Perl's encoding versus UTF8 octets by Polyglot
in thread Perl's encoding versus UTF8 octets by Polyglot

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.