Thanks for reviewing.
as you wrote, diff content may not be utf8 at all. and we don't know that the
user's terminal watns is utf8.
I think your trying utf8 decode and fall back approach is better than my patch,
and do work well.
is using $@ for catching error like the patch below?
According to
On 12 February 2014 20:59, Jeff King p...@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.
+
On Wed, Feb 12, 2014 at 11:10:49PM +, Thomas Adam wrote:
On 12 February 2014 20:59, Jeff King p...@peff.net wrote:
+sub decode {
+ my $orig = shift;
+ my $decoded = eval { decode_utf8($orig, Encode::FB_CROAK) };
+ return defined $decoded ?
I'd still advocate
On Wed, Feb 12, 2014 at 06:27:40PM -0500, Jeff King wrote:
On Wed, Feb 12, 2014 at 11:10:49PM +, Thomas Adam wrote:
On 12 February 2014 20:59, Jeff King p...@peff.net wrote:
+sub decode {
+ my $orig = shift;
+ my $decoded = eval { decode_utf8($orig, Encode::FB_CROAK)
On Thu, Feb 13, 2014 at 01:17:54AM +, brian m. carlson wrote:
On Wed, Feb 12, 2014 at 06:27:40PM -0500, Jeff King wrote:
On Wed, Feb 12, 2014 at 11:10:49PM +, Thomas Adam wrote:
On 12 February 2014 20:59, Jeff King p...@peff.net wrote:
+sub decode {
+ my $orig =
Signed-off-by: Yoshihiro Sugi sugi1...@gmail.com
diff-highlight split each hunks and compare them as byte sequences.
it causes problems when diff hunks include multibyte characters.
This change enable to work on such cases by decoding inputs and encoding output
as utf8 string.
---
Yoshihiro Sugi sugi1...@gmail.com writes:
Signed-off-by: Yoshihiro Sugi sugi1...@gmail.com
diff-highlight split each hunks and compare them as byte sequences.
it causes problems when diff hunks include multibyte characters.
This change enable to work on such cases by decoding inputs and
7 matches
Mail list logo