1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
\label{sec:fde0020}
The inputenc package replaces some characters -- i.\,e. german umlauts --
by \LaTeX{} code sequences. This is a good idea for ``normal'' text but not
for JavaScript code.
To avoid the conversion in JavaScript code the characters must not be added
directly to strings, add the corresponding JavaScript-Unicode notation
instead.
Table~\vref{tab:umlauts} contains some example Unicode notations for german
umlauts and ligatures.
\begin{longtable}{|r|l|}\caption{JavaScript-Unicode notation for german umlauts}\label{tab:umlauts}\\
\hline
&\\*[-0.9em]\multicolumn{1}{|c|}{\textbf{umlaut/ligature}}&\multicolumn{1}{c|}{\textbf{JavaScript-Unicode notation}}\\
\hline
\endfirsthead
\hline
&\\*[-0.9em]\multicolumn{2}{|r|}{\textsl{Continuation}}\\
\hline
\endhead
&\\*[-0.9em]\multicolumn{2}{|r|}{\textsl{to be continued}}\\
\hline
\endfoot
\hline
\endlastfoot
\hline
&\\*[-0.9em]&\textbackslash{}u00E4\\
\hline
&\\*[-0.9em]&\textbackslash{}u00F6\\
\hline
&\\*[-0.9em]&\textbackslash{}u00FC\\
\hline
&\\*[-0.9em]A&\textbackslash{}u00C4\\
\hline
&\\*[-0.9em]&\textbackslash{}u00D6\\
\hline
&\\*[-0.9em]&\textbackslash{}u00DC\\
\hline
&\\*[-0.9em]&\textbackslash{}u00DF\\
\end{longtable}
\clearpage
Here is an example how to use the Unicode notation
(see variable \textit{theText\/}):
\lstinputlisting{../examples/ex0301.tex}
\clearpage
|