From f7fdfdaeec3764929686064a6054c38a6b2d7788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Thu, 11 Jan 2024 17:04:37 +0100 Subject: =?UTF-8?q?Move=20{app-doc=20=E2=86=92=20app-text}/doxygen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per the category metadata, app-doc/ is reserved for documentation *files* and not software. Move it to app-text/ where it seems a better fit. Signed-off-by: Michał Górny --- .../files/doxygen-1.9.1-ignore-bad-encoding.patch | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 app-text/doxygen/files/doxygen-1.9.1-ignore-bad-encoding.patch (limited to 'app-text/doxygen/files/doxygen-1.9.1-ignore-bad-encoding.patch') diff --git a/app-text/doxygen/files/doxygen-1.9.1-ignore-bad-encoding.patch b/app-text/doxygen/files/doxygen-1.9.1-ignore-bad-encoding.patch new file mode 100644 index 000000000000..5dd7578f24ec --- /dev/null +++ b/app-text/doxygen/files/doxygen-1.9.1-ignore-bad-encoding.patch @@ -0,0 +1,23 @@ +Hack to avoid "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 45: invalid start byte" +in src/._xmlgen.cpp which is binary. This doesn't seem like it should be present at the time the docs +are generated, but this is simpler for now. +--- a/doc/translator.py ++++ b/doc/translator.py +@@ -1454,10 +1454,13 @@ class TrManager: + + # Read content of the file as one string. + assert os.path.isfile(fname) +- f = xopen(fname) +- cont = f.read() +- cont = ''.join(cont.split('\n')) # otherwise the 'match' function won't work. +- f.close() ++ try: ++ with xopen(fname) as f: ++ cont = f.read() ++ cont = ''.join(cont.split('\n')) # otherwise the 'match' function won't work. ++ except UnicodeDecodeError: ++ print("Skipping {0} because of decoding errors".format(fname)) ++ return + + # Remove the items for identifiers that were found in the file. + while lst_in: -- cgit v1.2.3