>>145
ありがとうございます。
string-as-unibyte はなぜか 3byte に変換されてしまいました。unibyte と multibyte にエンコーディングが絡むと
未だに何がなんだかわからなくなります・・・
とりあえず byteorder の戻り値を見て utf-16le と utf-16be を切り替えるあたりが妥当なところなんでしょうかね。

(equal "774=" (base64-encode-string (string-as-unibyte (char-to-string #xbeef))))
;; => nil
(equal "774=" (base64-encode-string (encode-coding-string (char-to-string #xbeef) 'binary)))
;; => nil
(equal "774=" (base64-encode-string (encode-coding-string (char-to-string #xbeef) 'utf-8)))
;; => nil
(equal "774=" (base64-encode-string (encode-coding-string (char-to-string #xbeef) 'utf-16be)))
;; => nil
(equal "774=" (base64-encode-string (encode-coding-string (char-to-string #xbeef) 'utf-16le)))
;; => t