Hello again!

Something you write is irritating for me.

I apologize. I did not mean to seem condescending. I think I shared some valuable tips that will help you get better help more quickly.

<cite>An even simpler SSCCE</cite>
I don't know, what you want to tell me with this. Actually I am not able to see a relation to my case. If there is one, then sorry.

The bug in your code was that you were misusing qw. I showed the simplest test that would prove that. (Also, note that the error you were originally getting was quite explicit, quoting the literal string "$encodings_test" as what you passed to the function.)

my issue - at this time - is to guess what encoding the input file is.

I'm sorry -- and I do not think this is a question of language -- but that is not your issue. That is your objective. Your issue is (was) the thing that was causing your current code to fail. Now, since you did not know what that was, you could not state it. But you could have stated the output that you did not expect from your program.

This is not, what I want. I want to deal with "non-utf8" strings. They should become utf8 strings but I don't want to deal with it. I guess that's quite different.

Very true. I mentioned Test::utf8 because it contains functions for trying to verify that what you think is encoded in UTF-8 really is. If you encode something to UTF-8 based on the guessed encoding of the source, you may want to check the result. But again I have to ask -- is it not possible for you to know the encoding of the data you are working with?

Hope this helps!


The way forward always starts with a minimal test.

In reply to Re^3: issue with Encode::Guess by 1nickt
in thread issue with Encode::Guess by toohoo

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.