
\protected\def\unihangulchar#1{\futurelet\dhucs@next\unihangulchar@#1\@nil}
\def\unihangulchar@{%
    \ifx\dhucs@next"\expandafter\hex@unihangulchar
    \else\expandafter\digit@unihangulchar
    \fi}
\def\digit@unihangulchar#1\@nil{\HCode{&\##1;}}
\def\hex@unihangulchar"#1\@nil{\HCode{&\#x#1;}}

\DeclareUnicodeCharacter{00B7}{~\unihangulchar{"00B7}~}

