My goal is to add a heavy underline to text that contains hyperlinks via the hyperref-package, such that, when printing out the file, one can see that there is a link hidded behind some words.
When adding a new command, \myhref, I found that the special German characters (ä,ö,ü,ß) contained in the latin1-options of inputenc are no longer working. In the normal \href, they are working, as they are contained in the scrbook document class, I believe.
\documentclass%
% [12pt,abstracton,titlepage,parskip=false, no, no,twoside=true,open=right]
{scrbook}
\usepackage[autooneside=false, headsepline, plainheadsepline, automark]{scrlayer-scrpage}
%%%%% Layout
\usepackage{geometry}
\geometry{top=1in, bottom=1in, left=1in, right=1in}
\usepackage{setspace}
\linespread{1}
\usepackage{url}
\usepackage[breaklinks=true]{hyperref}
\usepackage{graphicx}
\usepackage{color,soul} \setul{0.4ex}{0.3ex} \setulcolor{blue} \sethlcolor{yellow}
\newcommand{\myhref}[2]{%
\href{#1}{\ul{#2}}}
% \let\oldhref\href
% \renewcommand{\href}{%
% \oldhref{#1}{\setulcolor{blue}\ul{#2}}}
\begin{document}
\myhref{www.google.com%}{Schär Schar. fließen. Önvestment Investment.}
\href{www.google.com%}{Schär Schar. fließen. Önvestment Investment.}
\end{document}
Am I defining the new command wrongly?
As a comment pointed out, the solution was to use the package soulutf8 instead of soul in order to make the unterline accept the characters. However, I now ran into the subsequent problem, that the new command myhref does not accept "%" in the URL, but the old command hrefdoes. I adjusted the MWE.

soulutf8package instead ofsoul. – hair-splitter Jan 28 '23 at 09:30\myhref{www.google.com}{Schär Schar}works, but\myhref{www.google.com/%}{Schär Schar}does not. It works for the normal href-command. What needs to be changed`? – Marie. P. Jan 28 '23 at 11:33