Re: [PATCH] contrib/diff-highlight: multibyte characters diff
- From
Jeff King <peff@peff.net>
- Date
- Feb 12, 2014, 23:27 UTC
- Message-ID
- <20140212232740.GA11098@sigill.intra.peff.net>
- In-Reply-To
- <CA+39Oz5TSPNzYVvFytJwwUhRYjbEp5f_BdBWKT2tcYzpbF1WyQ@mail.gmail.com>
On Wed, Feb 12, 2014 at 11:10:49PM +0000, Thomas Adam wrote:
Show 7 quoted lines
> On 12 February 2014 20:59, Jeff King <peff@peff.net> wrote:
> > +sub decode {
> > + my $orig = shift;
> > + my $decoded = eval { decode_utf8($orig, Encode::FB_CROAK) };
> > + return defined $decoded ?
>
> I'd still advocate checking $@ here, rather than the defined $decoded check.I don't mind changing it, but for my edification, what is the advantage?
-Peff