#
#
# patch "lib/perl/Annotate.pm"
# from [f80a20fab4e1b51c47331dc69f52153a640b1be9]
# to [9a778d09c5f605b1795e81b05eb21f8feb4b1fb0]
#
# patch "lib/perl/Common.pm"
# from [33b20690eec1b473b319b4d1cd1d76c14ed75ed6]
# to [425d2a518dae5a26fd5d29793796e3f640b427fc]
#
# patch "lib/perl/FindFiles.pm"
# from [1f7f9f51e6f4c16a4f70e590a7d8907644cc6617]
# to [8545f8bea2d6d5b76ff34a5d949a7e29a553315d]
#
# patch "lib/perl/Globals.pm"
# from [d368dbb3992aaf613f8ed630b6c088b22954715e]
# to [09cc31511f47475ae3e8c8fdb5d4958175645df7]
#
# patch "lib/perl/History.pm"
# from [89afe8aae1a4b16a8ac2ebc7a31c7f4f8f27b504]
# to [7b9c9357c231510a04bb673b076cfbffc4fbb7a0]
#
# patch "lib/ui/mtn-browse.glade"
# from [a3bf967092a7b37ea5ed81d21f8fe0c4788490ed]
# to [14a1b707b7ed01890ee689c218fdb0a9a4bfd1ff]
#
# patch "mtn-browse"
# from [38065b65e4d04bd545d489d7e42c4873e610df57]
# to [0b1133d1a97872d445664bf5741f29380b98e0c1]
#
============================================================
--- lib/perl/Annotate.pm f80a20fab4e1b51c47331dc69f52153a640b1be9
+++ lib/perl/Annotate.pm 9a778d09c5f605b1795e81b05eb21f8feb4b1fb0
@@ -137,8 +137,10 @@ sub display_annotation($$$)
for ($i = 0; $i < scalar(@lines); ++ $i)
{
($prefix[$i], $lines[$i]) = (unpack($template, $lines[$i]))[0, 2];
- $prefix[$i] = decode_utf8($prefix[$i]);
- $lines[$i] = decode_utf8($lines[$i]);
+ eval
+ {
+ $lines[$i] = decode($file_encoding, $lines[$i], Encode::FB_CROAK);
+ };
$lines[$i] =~ s/\s+$//;
$lines[$i] = expand($lines[$i]);
$max_len = $len if (($len = length($lines[$i])) > $max_len);
============================================================
--- lib/perl/Common.pm 33b20690eec1b473b319b4d1cd1d76c14ed75ed6
+++ lib/perl/Common.pm 425d2a518dae5a26fd5d29793796e3f640b427fc
@@ -185,7 +185,6 @@ sub run_command($@)
eval
{
$pid = open3($fd_in, $fd_out, $fd_err, @args);
- binmode($fd_out, ":utf8");
};
# Check for errors (remember that open3() errors can happen in both the
============================================================
--- lib/perl/FindFiles.pm 1f7f9f51e6f4c16a4f70e590a7d8907644cc6617
+++ lib/perl/FindFiles.pm 8545f8bea2d6d5b76ff34a5d949a7e29a553315d
@@ -399,7 +399,7 @@ sub search_files_button_clicked_cb($$)
# We need to convert the contents pattern from possibly UTF-8 to binary
# as we may have to search binary data.
- $pattern = encode_utf8($query->{contents_pattern});
+ $pattern = encode($file_encoding, $query->{contents_pattern});
if ($query->{contents_pattern_is_regexp})
{
============================================================
--- lib/perl/Globals.pm d368dbb3992aaf613f8ed630b6c088b22954715e
+++ lib/perl/Globals.pm 09cc31511f47475ae3e8c8fdb5d4958175645df7
@@ -90,6 +90,10 @@ our $mono_font;
our $mono_font;
+# The encoding used for file contents.
+
+our $file_encoding = "utf8";
+
# Assorted pixmaps.
our $line_image;
@@ -129,7 +133,8 @@ our %EXPORT_TAGS = (constants => [qw(ALL
REVISION_DETAILS
REVISION_LIST
SELECTED_REVISION_CHANGED)],
- variables => [qw($glade_file
+ variables => [qw($file_encoding
+ $glade_file
$line_image
$mime_match_table
$mono_font
============================================================
--- lib/perl/History.pm 89afe8aae1a4b16a8ac2ebc7a31c7f4f8f27b504
+++ lib/perl/History.pm 7b9c9357c231510a04bb673b076cfbffc4fbb7a0
@@ -572,11 +572,13 @@ sub display_revision_comparison($$$;$)
$wm->update_gui();
if ($mtn->supports(MTN_CONTENT_DIFF_EXTRA_OPTIONS))
{
+ $mtn->suppress_utf8_conversion(1);
$mtn->content_diff($instance->{diff_output},
["with-header"],
$revision_id_1,
$revision_id_2,
$file_name);
+ $mtn->suppress_utf8_conversion(0);
}
else
{
@@ -632,8 +634,10 @@ sub display_revision_comparison($$$;$)
else
{
($char, $rest) = unpack("a1a*", $line);
- $char = decode_utf8($char);
- $rest = decode_utf8($rest);
+ eval
+ {
+ $rest = decode($file_encoding, $rest, Encode::FB_CROAK);
+ };
$rest =~ s/\s+$//;
$rest = expand($rest);
$max_len = $len if (($len = length($rest)) > $max_len);
@@ -877,9 +881,14 @@ sub display_revision_comparison($$$;$)
else
{
+ my $line = $instance->{diff_output}->[$i];
+ eval
+ {
+ $line = decode($file_encoding, $line, Encode::FB_CROAK);
+ };
$instance->{comparison_buffer}->insert
($instance->{comparison_buffer}->get_end_iter(),
- $instance->{diff_output}->[$i] . "\n");
+ $line . "\n");
}
if (($i % 100) == 0)
============================================================
--- lib/ui/mtn-browse.glade a3bf967092a7b37ea5ed81d21f8fe0c4788490ed
+++ lib/ui/mtn-browse.glade 14a1b707b7ed01890ee689c218fdb0a9a4bfd1ff
@@ -64,7 +64,7 @@
-
+
True
gtk-new
1
@@ -107,7 +107,7 @@
-
+
True
gtk-quit
1
@@ -145,6 +145,26 @@
+
+
+
+