Bug#950972: press: Broken/mangled space characters in 10.3 and 9.12 point release announcements
On Sat, Oct 09, 2021 at 04:43:37PM +0200, Guillem Jover wrote: > > I think the attached patch is the correct fix. I think I can push to > the repo, so if no one has any concerns I might do that during the > weekend. Thanks Guillem! The issue seems fixed now, I'm closing this bug. Ana
Bug#950972: press: Broken/mangled space characters in 10.3 and 9.12 point release announcements
Control: tags -1 patch Hi! On Sat, 2020-02-08 at 23:32:56 +0100, Salvatore Bonaccorso wrote: > Just checked quickly, in the script there is a U+00A0 (0xc2 0xa0) which seem > to > cause the issue. If I replace the space with "normal" space U+0020, then the > issue disapear. The issue at least is triggerable as well with older issues > not > only the recent 2020 ones. As has been mentioned in the bug report, there are other UTF-8 literals in the script, so replacing that one character does not fix the issue. > I do not know if this is the right solution, but attached patch with the > above. See above. I think the attached patch is the correct fix. I think I can push to the repo, so if no one has any concerns I might do that during the weekend. Thanks, Guillem From 1dcd625cd3282e66782cbe13e3fada43dd59e139 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sat, 9 Oct 2021 16:38:39 +0200 Subject: [PATCH] DPNhtml2mail: Set stdout encoding to UTF-8 We are printing UTF-8 characters, and should make the output match, otherwise we get local encodings. --- dpn/scripts/DPNhtml2mail.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dpn/scripts/DPNhtml2mail.pl b/dpn/scripts/DPNhtml2mail.pl index 8188dc5b..d4682d73 100755 --- a/dpn/scripts/DPNhtml2mail.pl +++ b/dpn/scripts/DPNhtml2mail.pl @@ -148,6 +148,8 @@ my $default_dpn_url = 'https://www.debian.org/News/weekly/'; my $default_news_mail = 'pr...@debian.org'; my $default_news_url = 'https://www.debian.org/News/'; +binmode STDOUT, ':utf8'; + # Option parsing GetOptions(\%opts, 'u|url=s', 'i|issue=s', 'l|lang=s', 'd|debug', 't|type=s', 'm|mail=s', 'wrap-list', 'do-not-wrap=s'); -- 2.33.0
Bug#950972: press: Broken/mangled space characters in 10.3 and 9.12 point release announcements
Hi Ana, On Sat, Feb 08, 2020 at 10:49:24PM +0100, Ana Guerrero Lopez wrote: > On Sat, Feb 08, 2020 at 10:41:47PM +0100, Salvatore Bonaccorso wrote: > > Package: press > > Severity: normal > > > > Hi > > > > Just noticed that in the release announcement for the 10.3[0] and > > 9.12[1] announcements, there seem to be broken spaces in the generated > > table between the source package names and the reference markers. > > > > Many thanks for your work! > > > > Regards, > > Salvatore > > > > [0] https://lists.debian.org/debian-announce/2020/msg0.html > > [1] https://lists.debian.org/debian-announce/2020/msg1.html > > These mails are generated from the website using this script: > https://salsa.debian.org/publicity-team/publicity/blob/master/dpn/scripts/DPNhtml2mail.pl > > That is adding an extra unicode character. > > A perl coder help would be very appreciated :-) Just checked quickly, in the script there is a U+00A0 (0xc2 0xa0) which seem to cause the issue. If I replace the space with "normal" space U+0020, then the issue disapear. The issue at least is triggerable as well with older issues not only the recent 2020 ones. Hexdump of current script: 1800 65 6e 74 20 3d 20 27 27 3b 0a 6d 79 20 24 6c 69 |ent = '';.my $li| 1810 6e 6b 5f 66 6f 72 6d 61 74 20 20 20 20 20 20 20 |nk_format | 1820 3d 20 27 c2 a0 5b 25 64 5d 27 3b 0a 6d 79 20 24 |= '..[%d]';.my $| 1830 6c 69 73 74 5f 6c 69 6e 6b 20 20 20 20 20 20 20 |list_link | 1840 20 20 3d 20 22 25 35 64 3a 20 22 3b 0a 0a 69 66 | = "%5d: ";..if| and patches replacing the space: 1800 65 6e 74 20 3d 20 27 27 3b 0a 6d 79 20 24 6c 69 |ent = '';.my $li| 1810 6e 6b 5f 66 6f 72 6d 61 74 20 20 20 20 20 20 20 |nk_format | 1820 3d 20 27 20 5b 25 64 5d 27 3b 0a 6d 79 20 24 6c |= ' [%d]';.my $l| 1830 69 73 74 5f 6c 69 6e 6b 20 20 20 20 20 20 20 20 |ist_link| 1840 20 3d 20 22 25 35 64 3a 20 22 3b 0a 0a 69 66 20 | = "%5d: ";..if | I do not know if this is the right solution, but attached patch with the above. Regards, Salvatore >From 5e3ad5df1c47db302914673edf6314b0c3e008c9 Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Sat, 8 Feb 2020 23:28:55 +0100 Subject: [PATCH] Replace NO-BREAK SPACE (U+00A0) with SPACE (U+0020) for link_format --- dpn/scripts/DPNhtml2mail.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpn/scripts/DPNhtml2mail.pl b/dpn/scripts/DPNhtml2mail.pl index 8188dc5bf5d0..2fc8abb4345b 100755 --- a/dpn/scripts/DPNhtml2mail.pl +++ b/dpn/scripts/DPNhtml2mail.pl @@ -192,7 +192,7 @@ my $project_name = 'The Debian Project'; my $openquote = ' "'; my $closequote = '" '; my $first_line_indent = ''; -my $link_format = ' [%d]'; +my $link_format = ' [%d]'; my $list_link = "%5d: "; if ($opts{l} eq "fr") { -- 2.25.0
Bug#950972: press: Broken/mangled space characters in 10.3 and 9.12 point release announcements
On Sat, Feb 08, 2020 at 10:41:47PM +0100, Salvatore Bonaccorso wrote: > Package: press > Severity: normal > > Hi > > Just noticed that in the release announcement for the 10.3[0] and > 9.12[1] announcements, there seem to be broken spaces in the generated > table between the source package names and the reference markers. > > Many thanks for your work! > > Regards, > Salvatore > > [0] https://lists.debian.org/debian-announce/2020/msg0.html > [1] https://lists.debian.org/debian-announce/2020/msg1.html These mails are generated from the website using this script: https://salsa.debian.org/publicity-team/publicity/blob/master/dpn/scripts/DPNhtml2mail.pl That is adding an extra unicode character. A perl coder help would be very appreciated :-) Cheers, Ana
Bug#950972: press: Broken/mangled space characters in 10.3 and 9.12 point release announcements
Package: press Severity: normal Hi Just noticed that in the release announcement for the 10.3[0] and 9.12[1] announcements, there seem to be broken spaces in the generated table between the source package names and the reference markers. Many thanks for your work! Regards, Salvatore [0] https://lists.debian.org/debian-announce/2020/msg0.html [1] https://lists.debian.org/debian-announce/2020/msg1.html