From 6184b8bca3e2264db82e6091cff08a9d09190976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Sat, 15 Apr 2017 16:53:34 +0200 Subject: Fix SQL_ASCII -> UTF8 decoding issues --- extensions/Mageia/Extension.pm | 9 +++++++++ 1 file changed, 9 insertions(+) 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; -- cgit v1.2.1