Review 10.4 Merged

77082[BUGFIX] Avoid double UTF-8 encoded PDF metadata in file indexer

Benjamin Franzke CR +2 V +2 Easy +2 −2 updated 12/13/22, 09:11

Commit message

There are different versions of pdfinfo available and used
by different providers/distributions.

a) Debian/Fedora use pdfinfo (>v20) from the poppler-utils package.
   Also hosters like Hetzner use this version.
   This variant defaults to UTF-8 output for metadata:
   https://linux.die.net/man/1/pdfinfo
   > -enc encoding-name
   Sets the encoding to use for text output. This defaults to "UTF-8".

   pdfinfo -v
   pdfinfo version 21.08.0
   Copyright 2005-2021 The Poppler Developers -
                       http://poppler.freedesktop.org
   Copyright 1996-2011 Glyph & Cog, LLC

b) Older servers and hosters with legacy software (Mittwald,
   Domainfactory) use pdfinfo v3. This one defaults to Latin1 output:
   https://www.xpdfreader.com/pdfinfo-man.html
   > −enc encoding-name
   > Sets the encoding to use for text output. […]
   > This defaults to "Latin1"

   pdfinfo -v
   pdfinfo version 3.02
   Copyright 1996-2007 Glyph & Cog, LLC

Both versions support an -enc UTF-8 option, which is nowused to
circumvent the differences between these tools, instead of implying
Latin1 output (as done in #80085) which breaks variant a) by
interpreting valid UTF-8 as ISO-8859-1 and thus applying
a double encoding.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 56

  1. Benjamin Franzke uploaded patch set 1 12/13/22, 08:33

  2. Benni Mack voted on patch set 1 V +1 CR +1 12/13/22, 08:41

  3. Stefan Bürk voted on patch set 1 V +1 CR +1 12/13/22, 08:46

  4. core-ci voted on patch set 1 V +1 12/13/22, 09:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34984

  5. Benni Mack voted on patch set 1 V +2 CR +2 12/13/22, 09:11

  6. Benni Mack merged patch set 2 12/13/22, 09:11