A basic document with Chinese text works fine:
\documentclass{article}
\usepackage{CJKutf8}
\title{标题}
\begin{document}
\begin{CJK}{UTF8}{gkai}
\maketitle
(text)
\end{CJK}
\end{document}
When I add a table of contents and 1 section with Chinese text, it does not compile:
\documentclass{article}
\usepackage{CJKutf8}
\begin{document}
\begin{CJK}{UTF8}{gkai}
\tableofcontents
\section{第一章}
(text)
\end{CJK}
\end{document}
Package inputenc Error: Unicode char \u 8:第 not set up for use with LaTeX.
When I create an index entry with Chinese text, it also does not compile:
\documentclass{article}
\usepackage{CJKutf8}
\usepackage{makeidx}
\makeindex
\begin{document}
\begin{CJK}{UTF8}{gkai}
(text) \index{nihao@ 你好 nihao}
\printindex
\end{CJK}
\end{document}
! Package inputenc Error: Unicode char \u 8:你 not set up for use with LaTeX.
See the inputenc package documentation for explanation. Type H for immediate help. ...
l.3 ...reak or to continue without it.} \GenericError {(inputenc)...
What am I doing wrong?
