Re: Bug#950972: press: Broken/mangled space characters in 10.3 and 9.12 point release announcements

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Bug#950972: press: Broken/mangled space characters in 10.3 and 9.12 point release announcements

Ana Guerrero Lopez
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/msg00000.html
> [1] https://lists.debian.org/debian-announce/2020/msg00001.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

Reply | Threaded
Open this post in threaded view
|

Re: Bug#950972: press: Broken/mangled space characters in 10.3 and 9.12 point release announcements

Salvatore Bonaccorso-4
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/msg00000.html
> > [1] https://lists.debian.org/debian-announce/2020/msg00001.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:

00001800  65 6e 74 20 3d 20 27 27  3b 0a 6d 79 20 24 6c 69  |ent = '';.my $li|
00001810  6e 6b 5f 66 6f 72 6d 61  74 20 20 20 20 20 20 20  |nk_format       |
00001820  3d 20 27 c2 a0 5b 25 64  5d 27 3b 0a 6d 79 20 24  |= '..[%d]';.my $|
00001830  6c 69 73 74 5f 6c 69 6e  6b 20 20 20 20 20 20 20  |list_link       |
00001840  20 20 3d 20 22 25 35 64  3a 20 22 3b 0a 0a 69 66  |  = "%5d: ";..if|

and patches replacing the space:

00001800  65 6e 74 20 3d 20 27 27  3b 0a 6d 79 20 24 6c 69  |ent = '';.my $li|
00001810  6e 6b 5f 66 6f 72 6d 61  74 20 20 20 20 20 20 20  |nk_format       |
00001820  3d 20 27 20 5b 25 64 5d  27 3b 0a 6d 79 20 24 6c  |= ' [%d]';.my $l|
00001830  69 73 74 5f 6c 69 6e 6b  20 20 20 20 20 20 20 20  |ist_link        |
00001840  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

0001-Replace-NO-BREAK-SPACE-U-00A0-with-SPACE-U-0020-for-.patch (814 bytes) Download Attachment