[OT] Encode woes
djk at tobit.co.uk
Fri Sep 25 11:01:22 BST 2009
Daniel Pittman wrote:
> Philip Newton <philip.newton at gmail.com> writes:
>> On Fri, Sep 25, 2009 at 09:54, Dirk Koopman <djk at tobit.co.uk> wrote:
>>> Dirk Koopman wrote:
>>>> Now, is there a reasonably reliable way of determining what we have, on a
>>>> string by string basis, to at least tell whether we are dealing with utf8
>>>> or iso-8859 (not caring which variant) so that I can drive Encode
>>>> appropriately to avoid crashes of the above type.
> There isn't one. You /can/ check for valid or invalid UTF-8, and make a guess
> about it, or perhaps use something like Encoding::Detect, but nothing can
> completely reliably determine which is which.
>>>> Or how do I completely switch off utf8 encoding/decoding - everywhere - in
>>>> an 80,000 line perl app.
> I am honestly surprised it got turned on anywhere; I fear that I don't know a
> mechanism for doing this universally short of modifying all the code, sorry.
Well something has changed in 5.10.x from 5.8.x in this area, because I
have nodes running both (as well as a few 5.005 and 5.6.x) and only
5.10.x nodes are banging out (very occasionally [just to be annoying])
with these "trying to XXXXXX with wide character" errors.
More information about the london.pm