# Need to write "U despite of using ngerman babel

I write a presentation in German language, so I use

\usepackage[ngerman]{babel}

Now, I want to write "UTF-8" but the output looks like that:

How can I fix it?

MWE:

\documentclass{beamer}

\usepackage[ngerman]{babel}

\begin{document}

\begin{frame}
\texttt{"UTF-8"}
\end{frame}

\end{document}
• "{}UTF-8" if you want to keep using shorthands in the rest of your document. – user36296 Jan 9 at 15:07
• \verb|"UTF-8"| would work as well but might require fragile setting on the frame. – Martin Scharrer Jan 12 at 13:31

The " character is defined as a shorthand for \" which is why you get the umlaut on the U. Assuming you are writing umlauts directly in your source anyway, you likely don't need the shorthand, so the easiest solution is to turn it off. You can do this by adding the shorthands = off option to babel:

\documentclass{beamer}