unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* write file with coding-system utf-16 doesnt work
@ 2005-10-13  7:26 Dirk Zabel
  2005-10-13 11:28 ` Andy Moreton
  0 siblings, 1 reply; 3+ messages in thread
From: Dirk Zabel @ 2005-10-13  7:26 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: write file with coding-system utf-16 doesnt work
  2005-10-13  7:26 write file with coding-system utf-16 doesnt work Dirk Zabel
@ 2005-10-13 11:28 ` Andy Moreton
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Moreton @ 2005-10-13 11:28 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: write file with coding-system utf-16 doesnt work
@ 2005-10-14  8:16 Dirk Zabel
  0 siblings, 0 replies; 3+ messages in thread
From: Dirk Zabel @ 2005-10-14  8:16 UTC (permalink / raw)


Thank you Andy!
Your code works fine. I'm feeling not so smart... should have done this 
by myself. But the question remains: why are this support functions 
missing from the standard distribution?
Regards
   Dirk

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-10-14  8:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-13  7:26 write file with coding-system utf-16 doesnt work Dirk Zabel
2005-10-13 11:28 ` Andy Moreton
  -- strict thread matches above, loose matches on Subject: below --
2005-10-14  8:16 Dirk Zabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).