+
+(eval-and-compile
+ (defun utf7-find-coding-system-without-bom (cs)
+ (and (fboundp 'find-coding-system)
+ (find-coding-system cs)
+ ;; Avoid versions with BOM.
+ (= 2 (length (encode-coding-string "a" cs)))
+ cs)))
+
+(defconst utf7-utf-16-coding-system
+ (or
+ ;; Emacs 22, Emacs 23
+ (utf7-find-coding-system-without-bom 'utf-16be)
+ ;;
+ (utf7-find-coding-system-without-bom 'utf-16-be)
+ ;; Mule-UCS
+ (utf7-find-coding-system-without-bom 'utf-16-be-no-signature))