in reply to Weird Date::Manip DateParse fail

Maybe this:

14th August 2017, 

HTML-decodes not to a space after the comma but to \x{A0} after the comma, which looks like a plain space but is non-breaking whitespace?

Replies are listed 'Best First'.
Re^2: Weird Date::Manip DateParse fail
by dbander (Scribe) on Aug 17, 2017 at 19:21 UTC

    For kicks, I ran it on a Windows system, and the evidence on the console supports Corion's conclusion (note the á where the   would be, which showed as whitespace on the original example):

    M:\PerlMonks>perl parsedate.pl postdate: 14th August 2017,á21:07 postdate parsed: string parsed: 2017081421:07:00

      Thanks guys. That fixed it. I guess I should have checked that before posting!

        On the contrary, thanks for asking. If everyone already knew the correct answers, then no one would be asking questions here on Perl Monks, and I would not be able to learn from those questions like I do every day.

Re^2: Weird Date::Manip DateParse fail
by snax (Hermit) on Sep 29, 2017 at 02:09 UTC

    Thank you for this. I'm trying to capture some table data and the $#160 source elements (which are translated to nbsp elements when inspecting the HTML::Element as_HTML() output) come through in HTML::Element's as_text() method as weird characters, and I couldn't figure out how to clean them with regexes. Now I just

    my $el = $_->as_text(); my $nbsp = chr(160); $el =~ s/$nbsp/ /g;

    and all is well :)