From owner-freebsd-chat@FreeBSD.ORG Tue Feb 3 15:12:46 2009 Return-Path: Delivered-To: freebsd-chat@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C03C31065672 for ; Tue, 3 Feb 2009 15:12:46 +0000 (UTC) (envelope-from lab@gta.com) Received: from mailgate.gta.com (mailgate.gta.com [199.120.225.20]) by mx1.freebsd.org (Postfix) with SMTP id 545238FC19 for ; Tue, 3 Feb 2009 15:12:46 +0000 (UTC) (envelope-from lab@gta.com) Received: (qmail 60448 invoked by uid 1000); 3 Feb 2009 15:12:45 -0000 Date: 3 Feb 2009 15:12:45 -0000 Message-ID: <20090203151245.60447.qmail@mailgate.gta.com> From: Larry Baird To: freebsd-chat@freebsd.org Organization: Global Technology Associates In-Reply-To: <10911.2654.10281@localhost> X-Newsgroups: freebsd.chat User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.3-PRERELEASE (i386)) Cc: Giorgos Keramidas Subject: Re: UTF as Filename Extension X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 15:12:47 -0000 In article <10911.2654.10281@localhost> you wrote: > On Sat, 31 Jan 2009 13:43:01 -0800, "Jason C. Wells" wrote: > > Here is a simple discussion that is probably more complex than I'd like > > it to be. Is there any way to enforce a UTF-8 encoding of a file, > > perhaps by filename extension? Could such an encoding solve cross > > platform line break incompatibility? > > I find that Emacs makes a very good job of 'hiding' these annoying > details from me. In both X11 and `no window' sessions of the editor, > the coding-system auto-detection of new buffers works 99% of the time > and I can specify it manually when it doesn't. > > Using the filename for automated guesses of what the content may be is > probably not going to work so well. Windows has tried doing it, and see > all the ATTACHMENT.JPG.EXE trojans they got as a result :) I have had luck using vim and setting the following in my environment. LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 I have also put utf-8 bomb characters at the beginning of my text files. Take a look at: http://vim.wikia.com/wiki/Working_with_Unicode -- ------------------------------------------------------------------------ Larry Baird | http://www.gta.com Global Technology Associates, Inc. | Orlando, FL Email: lab@gta.com | TEL 407-380-0220, FAX 407-380-6080