Review 12.1 Merged

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

Oliver Hader CR +2 V +2 Easy +2 −2 updated 12/13/22, 11:34

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
    • Oliver Hader +2
  • Verified V +2 Done
    • Oliver Hader +2

Issues 2

Files 1

Review log 710

  1. Oliver Hader uploaded patch set 1 12/13/22, 11:09

  2. Oliver Hader updated the commit message in patch set 2 12/13/22, 11:11

  3. core-ci voted on patch set 1 V -1 12/13/22, 11:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35025

  4. core-ci voted on patch set 2 V -1 12/13/22, 11:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35028

  5. Stefan Bürk voted on patch set 2 V +1 CR +1 12/13/22, 11:15

  6. Oliver Hader rebased onto patch set 3 CR +1 V +1 12/13/22, 11:17

  7. core-ci voted on patch set 3 V -1 12/13/22, 11:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35031

  8. Oliver Hader wrote 12/13/22, 11:33

    Removed Verified-1 by core-ci
  9. Oliver Hader voted on patch set 3 V +2 CR +2 12/13/22, 11:34

  10. Oliver Hader merged patch set 4 12/13/22, 11:34