RFR: 2637: Decoding emails from quoted-printable is broken [v2]

Erik Joelsson erikj at openjdk.org
Tue Dec 16 23:18:17 UTC 2025


> During my initial implementation of Mailman 3 support, I made an attempt at decoding quoted-printable encoded email bodies. That implementation isn't working that well. I only took 2 byte encoded UTF-8 characters into account, but we of course need to also handle 3 and 4 byte characters.
> 
> Instead of trying to do this with regular expressions, I bit the bullet and started working on a byte array, byte by byte. That actually makes it a lot simpler as we just need to translate each encoded triplet (`=XX`) at a time and then just convert the resulting byte array using Java's built in character set decoder.

Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision:

  Added logging of failed email parsing

-------------

Changes:
  - all: https://git.openjdk.org/skara/pull/1747/files
  - new: https://git.openjdk.org/skara/pull/1747/files/6c95afdf..651fa7dd

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=skara&pr=1747&range=01
 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1747&range=00-01

  Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/skara/pull/1747.diff
  Fetch: git fetch https://git.openjdk.org/skara.git pull/1747/head:pull/1747

PR: https://git.openjdk.org/skara/pull/1747


More information about the skara-dev mailing list