aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@netscape.net>2017-04-15 16:53:34 +0200
committerFrédéric Buclin <LpSolit@netscape.net>2017-04-15 16:53:34 +0200
commit6184b8bca3e2264db82e6091cff08a9d09190976 (patch)
treedd6d4152e8727b956a23047866868aa988905e84
parent4dabb5468ca856c84ef9add045785c73f6a2e94c (diff)
downloadbugs-6184b8bca3e2264db82e6091cff08a9d09190976.tar
bugs-6184b8bca3e2264db82e6091cff08a9d09190976.tar.gz
bugs-6184b8bca3e2264db82e6091cff08a9d09190976.tar.bz2
bugs-6184b8bca3e2264db82e6091cff08a9d09190976.tar.xz
bugs-6184b8bca3e2264db82e6091cff08a9d09190976.zip
Fix SQL_ASCII -> UTF8 decoding issues
-rw-r--r--extensions/Mageia/Extension.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/extensions/Mageia/Extension.pm b/extensions/Mageia/Extension.pm
index 5580e583a..19d579c63 100644
--- a/extensions/Mageia/Extension.pm
+++ b/extensions/Mageia/Extension.pm
@@ -85,6 +85,15 @@ sub bug_end_of_update {
}
}
+sub bug_format_comment {
+ my ($self, $args) = @_;
+ my $regexes = $args->{'regexes'};
+ # The Mageia DB was initially using SQL_ASCII as encoding (which means "no encoding").
+ # The move to UTF8 caused some characters to be badly decoded, which we fix here.
+ # Convert "é" into "é".
+ push(@$regexes, { match => qr/\xc3\xa9/, replace => "\xe9" });
+}
+
sub enter_bug_entrydefaultvars {
my ($self, $vars) = @_;
my $cgi = Bugzilla->cgi;