From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: [brakjoller@gmail.com: setting utf-16 as file-name-coding-system locks up emacs] Date: Thu, 12 Aug 2004 20:36:12 +0900 (JST) Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <200408121136.UAA18142@etlken.m17n.org> References: <200408091228.VAA10104@etlken.m17n.org> <200408100133.KAA11854@etlken.m17n.org> <200408101058.TAA12976@etlken.m17n.org> <200408101144.UAA13100@etlken.m17n.org> <4118B90D.9060007@gnu.org> <87n011g28q.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1092310634 25791 80.91.224.253 (12 Aug 2004 11:37:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 12 Aug 2004 11:37:14 +0000 (UTC) Cc: jasonr@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 12 13:37:01 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 1BvDtE-00066B-00 for ; Thu, 12 Aug 2004 13:37:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BvDx8-0005AC-II for ged-emacs-devel@m.gmane.org; Thu, 12 Aug 2004 07:41:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BvDwv-00058V-DL for emacs-devel@gnu.org; Thu, 12 Aug 2004 07:40:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BvDwu-00057n-Fi for emacs-devel@gnu.org; Thu, 12 Aug 2004 07:40:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BvDwu-00057b-A0 for emacs-devel@gnu.org; Thu, 12 Aug 2004 07:40:48 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BvDsf-0004g7-Bt; Thu, 12 Aug 2004 07:36:26 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.12.3/8.12.3/Debian-6.6) with ESMTP id i7CBaCEd024323; Thu, 12 Aug 2004 20:36:13 +0900 Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.6p2/8.11.6) with ESMTP id i7CBaCU06130; Thu, 12 Aug 2004 20:36:12 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id UAA18142; Thu, 12 Aug 2004 20:36:12 +0900 (JST) Original-To: brakjoller@gmail.com In-reply-to: (message from Mattis on Thu, 12 Aug 2004 10:22:03 +0200) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:26247 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26247 In article , Mattis writes: > OK. So, the best would be to have the encoding set to > "undecided" and then let Emacs figure out which encoding > is used, right? Unfortunately, no. By that, Emacs may be able to decode the file name corrrectly, but it doesn't remember the encoding for the time it has to encode the file name. I belive that Windows itself has a function to handle such a file name consistently. So, I think the best is to make a speical coding system, say windows-file-name, that works only for Windows. It decodes file names into utf-8 sequence (internal code of Emacs-Unicode), and encode file names into locale encoding or utf-16le-with-signature depending on the contents. --- Ken'ichi HANDA handa@m17n.org