help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: write file with coding-system utf-16 doesnt work


From: Andy Moreton
Subject: Re: write file with coding-system utf-16 doesnt work
Date: Thu, 13 Oct 2005 11:28:28 +0000 (UTC)
User-agent: Xnews/06.08.25

On Thu, 13 Oct 2005 07:26:43 GMT, Dirk Zabel wrote:

> Hi,
> if i try to save a file with coding-system utf-16-le, i keep getting the 
> message
>    symbol's function definition is void: utf16-le-pre-write-conversation
> With tuf-16-be, i get the corresponding message:
>    symbol's function definition is void: utf16- be-pre-write-conversation
> 
> On the other hand utf-8 works fine.
> 
> M-x emacs-version gives:
>    GNU Emacs 21.3.1 (i386-mingw-windows98.2222) of 2004-03-10 on NYAUMO
> 
> As far as i can see, this is the current binary package available for 
win32.
> 
> I would be grateful for any hint.
> 
> Thanks in advance
>    Dirk

Add the following to your .emacs file:

;; Detect endianness of UTF-16 containing a Byte Order Mark U+FEFF 
(add-to-list 'auto-coding-regexp-alist '("^\xFF\xFE" . utf-16-le) t)
(add-to-list 'auto-coding-regexp-alist '("^\xFE\xFF" . utf-16-be) t)

;; Add missing support functions
(defun utf-16-le-pre-write-conversion (start end) nil)
(defun utf-16-be-pre-write-conversion (start end) nil)


HTH

        AndyM


reply via email to

[Prev in Thread] Current Thread [Next in Thread]