I try to get an PDF/A document and followed different samples. When using pdfx to my understanding I cannot use any longer \hyperref package. Therefore I have problems to set the encoding. I have the following MWE
\PassOptionsToPackage{a-3b}{pdfx}
\PassOptionsToPackage{pdfa, pdfencoding=auto}{hyperref}
\RequirePackage{filecontents} %if filecontents should overwrite old files
\begin{filecontents}{\jobname.xmpdata}
\Title{My Title möglich ÖÜß } % <--------------------- not encoded
\Author{John Doe}
\Source{my test} %<-------- not used
\end{filecontents}
\documentclass[12pt,a4paper,oneside,openright]{book}
\usepackage{lipsum}
\usepackage{pdfx}
% \usepackage{hyperref} % comment out if using the 'pdfx' package
\hypersetup{%
anchorcolor = black,
unicode = true,
}%
% ---------- packages to be loaded after hyperref ----------%
\usepackage{bookmark} % does not work with pdfx package in lualatex?
\begin{document}
\tableofcontents
\chapter{First}
\section{First section}
\lipsum[1-2]
\section{Second section}
\lipsum[1-10]
\chapter{Second}
\section{New section}
\lipsum[1-5]
\section{Newer section}
\lipsum[1-8]
\end{document}
According to the documentation 2.4 all UTF-8 chars are allowed. 
So my major problem is how to set the encoding properly?
hyperrefI face the same Problem untlil I setpdfencoding=auto. So I have no clue why this approach has a different result. I'm working on a Linux and the system is more or less up2date. I think the packages are from March20 but I have serious problems to check in detail. – LeO Dec 01 '20 at 20:38filecontentswrites the wrong encoding under Linux? – LeO Dec 01 '20 at 20:40