From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.help Subject: Re: reading binary, non-unix file Date: 26 Oct 2004 11:05:49 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1098805275 8317 80.91.229.6 (26 Oct 2004 15:41:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 26 Oct 2004 15:41:15 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 26 17:41:12 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CMTRf-00009m-00 for ; Tue, 26 Oct 2004 17:41:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CMTZN-0000kS-3X for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Oct 2004 11:49:09 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-X-Trace: news.uni-berlin.de Mx5EjPM+N1o0+QmUsazAxAN6ABSE3jFMQYPDaYYP7GdlDvEm/J User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-Xref: shelby.stanford.edu gnu.emacs.help:126065 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:21443 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:21443 "Mickey Ferguson" writes: > We're almost there. I don't have a single UTF-16 coding choice. > When I tried what you provided, I saw: > Possible completions are: > utf-16-be utf-16-be-dos > utf-16-be-mac utf-16-be-unix > utf-16-le utf-16-le-dos > utf-16-le-mac utf-16-le-unix > I chose utf-16-le and it seemed to do it properly. I just don't > know if that was the right choice - I don't fully understand what > each of these provides. I wont comment on -le and -be but I have noticed that "utf-16" also works (at least I have it in my CVS Emacs). utf-16-le is what Microsoft uses to encode Unicode data in files so that is the one you want to use. > Second, after I determine which one of the above to use, can anyone > help me to write a function so that I can then map a key combination > (similar to C-X C-F uses Find-File), that will load in the proper > coding and then find the file? I'm lisp-impaired, so any help would > be appreciated. I'm capable of taking an interactive function > that's been defined and mapping it to a keystroke, but that's about > it. I had the same problem and instead of searching the net or asking here I just created a keyboard macro which I then named, put in my .emacs and which I then bound a key to. You start and stop a keyboard macro with C-x ( and C-x ) respectively. You can then name it with M-x name-last-kbd-macro and then insert it so that it acts as a function (sort of) in your .emacs with M-x insert-kbd-macro . Hope this helps! /Mathias