+ return encode_builtin_char_1 (ch, charset);
+}
+
+INLINE_HEADER int encode_char_2 (Emchar ch, Lisp_Object* charset);
+INLINE_HEADER int
+encode_char_2 (Emchar ch, Lisp_Object* charset)
+{
+ int code_point = encode_char_1 (ch, charset);
+
+ if (EQ (*charset, Vcharset_mojikyo))
+ {
+ int plane, byte1, byte2;
+
+ code_point--;
+ plane = code_point / (94 * 60);
+ byte1 = (code_point % (94 * 60)) / 94;
+ if (byte1 < 30)
+ byte1 += 16 + 32;
+ else
+ byte1 += 18 + 32;
+ byte2 = code_point % 94 + 33;
+ *charset
+ = CHARSET_BY_LEADING_BYTE (LEADING_BYTE_MOJIKYO_PJ_1 - plane);
+ return (byte1 << 8) | byte2;
+ }
+ else
+ return code_point;