lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250905093908.12ac00d3@foz.lan>
Date: Fri, 5 Sep 2025 09:39:08 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Jonathan Corbet <corbet@....net>
Cc: Linux Doc Mailing List <linux-doc@...r.kernel.org>, Akira Yokosawa
 <akiyks@...il.com>, Dongliang Mu <dzm91@...t.edu.cn>, Federico Vaga
 <federico.vaga@...a.pv.it>, Randy Dunlap <rdunlap@...radead.org>, Yanteng
 Si <si.yanteng@...ux.dev>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 04/19] scripts: sphinx-pre-install: move it to
 tools/docs

Em Thu, 04 Sep 2025 10:42:56 -0600
Jonathan Corbet <corbet@....net> escreveu:

> Mauro Carvalho Chehab <mchehab+huawei@...nel.org> writes:
> 
> > As we're reorganizing the place where doc scripts are located,
> > move this one to tools/docs.
> >
> > No functional changes.
> >
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
> > ---
> >  Documentation/Makefile                             | 14 +++++++-------
> >  Documentation/doc-guide/sphinx.rst                 |  4 ++--
> >  Documentation/sphinx/kerneldoc-preamble.sty        |  2 +-
> >  .../translations/it_IT/doc-guide/sphinx.rst        |  4 ++--
> >  .../translations/zh_CN/doc-guide/sphinx.rst        |  4 ++--
> >  Documentation/translations/zh_CN/how-to.rst        |  2 +-  
> 
> This one fails to apply to the translations - it looks like some sort of
> encoding problem...?

Yes. My new mailbomb script in Python mangled it.

I ended sending you a PR, as this way we know for sure that we won't
have any encoding issues on either side.

---

Checking encoding after the patch series:

    $ file Documentation/translations/zh_CN/how-to.rst
    Documentation/translations/zh_CN/how-to.rst: Unicode text, UTF-8 text

    $ python3
    Python 3.13.7 (main, Aug 14 2025, 00:00:00) [GCC 15.2.1 20250808 (Red Hat 15.2.1-1)] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> with open("Documentation/translations/zh_CN/how-to.rst", "r", encoding="utf-8") as fp: c=fp.read()
    ... 
   >>> 

And manually looking on its contents, the patch itself is OK.

Looking at the e-mail generated using Python EmailMessage class, however:   

    Content-Type: text/plain; charset="utf-8"
    MIME-Version: 1.0
    Content-Transfer-Encoding: 8bit

Python completely mangled it by replacing all UTF chars with �:

	--- a/Documentation/translations/zh_CN/doc-guide/sphinx.rst
	+++ b/Documentation/translations/zh_CN/doc-guide/sphinx.rst
	@@ -84,7 +84,7 @@ PDF���LaTeX������
	 ������������������������������������Sphinx������������������������������������������������������������������������
	 ������������������::
	 
	-	$ ./scripts/sphinx-pre-install
	+	$ ./tools/docs/sphinx-pre-install
	 	Checking if the needed tools for Fedora release 26 (Twenty Six) are available

When I have time, I'll try to fix it - or end giving up of the Python
version returning to the Perl one, even with the content set to
utf-8 at set_content() function call.

Thanks,
Mauro

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ