in reply to Re: Encoding Detection in perl?
in thread Encoding Detection in perl?

I have tried Encode::Guess before but seems utf8 knock it down...any more suggestion?

Replies are listed 'Best First'.
Re^3: Encoding Detection in perl?
by ww (Archbishop) on Feb 22, 2008 at 12:43 UTC
    "knock it down" ! eq "The error message is (....)" nor "The output varies from what I expected; (samples).

    "tried Encode::Guess...." ! eq (the code you wrote)

    A snippet of the code that failed (boil it down, check that that is indeed what leads to the failure) and the exact output will get you better answers.

      I am sorry that they are gone.

      Can anybody show the workable code?

        The Encode::Guess documentation shows pieces of working code in the synopsis. I used it that way, and it worked for me (with utf-8, ISO-8859-1 and a few others, can't recall exactly).

        If you have more specific requirements, you need more specific code. But we don't know about any of these, so we can't help you. Sorry.

Re^3: Encoding Detection in perl?
by moritz (Cardinal) on Feb 22, 2008 at 12:39 UTC
    In my experience it works fine with UTF-8 (although it needs quite a bit of data to work reliably).

    Could you show us some example code, and the data that "knocked" it down? (perhaps post a hexdump of the data here, I don't think perlmonks is binary-safe ;-)

    And if it dies for some data, maybe you should write a bug report.