The xesearch package allows one to replace text with other text. E.g.:
\documentclass{ctexbook}
\usepackage{fontspec}
\usepackage{xesearch}
\SearchList{list1}{newspaper}{book}
\begin{document}
The book costs \$1.
\end{document}
When the document compiles, it reads, "The newspaper costs $1." When I tried other languages (e.g. \SearchList{list1}{书}{book}), it prints "The costs $1." (with a blank space where the character should appear), however, the document has no difficulty displaying the same character "书" elsewhere in the document.
How can I replace foreign characters?
Update:
The code manages to successfully replace the characters, however, the lines aren't breaking in the replacement text:
\documentclass[a5paper]{ctexbook}
\pdfpagewidth=148mm
\pdfpageheight=210mm
\usepackage{fontspec}
\setmainfont{Adobe Song Std}
\setCJKmainfont{Adobe Song Std}
\usepackage{xesearch}
\SearchList{list1}{床前明月光,疑是地上霜。举头望明月,低头思故乡。}{poem}
\begin{document}
\Huge
\noindent 床前明月光,疑是地上霜。举头望明月,低头思故乡。 \\
\noindent poem \\
\end{document}


书glyph, haven't you? Please, make a complete example. – egreg Jan 20 '12 at 13:52