Previous step: “Encodings

# ASCII output

The following LaTeX document contains “Hello, World!” written in Chinese:

\documentclass{article}
\usepackage[encapsulated]{CJK}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\begin{document}
\begin{CJK}{UTF8}{cyberbit}

\end{CJK}
\end{document}


LaTeX successfully compiles this document. But imagine:

• you've got a problem with a CJK or other non-latin document,
• latin documents don't have this problem, so
• you want to ask for help.

To get help, you should provide a minimal example to reproduce the problem. Unfortunately, in most cases, your non-ASCII example will be corrupted.

Luckily, TeX provides ASCII sequences to encode non-ASCII bytes. With the command line flag --ascii (or -a), the TeXML processor uses ASCII sequences. For example, the same LaTeX document is written in the following way:

\documentclass{article}
\usepackage[encapsulated]{CJK}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\begin{document}
\begin{CJK}{UTF8}{cyberbit}
^^e4^^b8^^96^^e7^^95^^8c^^ef^^bc^^8c^^e4^^bd^^a0^^e5^^a5^^bd^^ef^^bc^^81
\end{CJK}
\end{document}