From owner-freebsd-questions@freebsd.org Sun May 17 03:23:12 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2738713B928 for ; Sun, 17 May 2020 03:23:12 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: from outgoing.tristatelogic.com (segfault.tristatelogic.com [69.62.255.118]) by mx1.freebsd.org (Postfix) with ESMTP id 49PnXZ67sbz3b52 for ; Sun, 17 May 2020 03:23:10 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: by segfault.tristatelogic.com (Postfix, from userid 1237) id EB0E34E73E; Sat, 16 May 2020 20:23:07 -0700 (PDT) From: "Ronald F. Guilmette" To: Yuri Pankov Cc: freebsd-questions@freebsd.org Subject: Re: (character) Conversion error (in vi) ? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <72823.1589685787.1@segfault.tristatelogic.com> Date: Sat, 16 May 2020 20:23:07 -0700 Message-ID: <72824.1589685787@segfault.tristatelogic.com> X-Rspamd-Queue-Id: 49PnXZ67sbz3b52 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rfg@tristatelogic.com designates 69.62.255.118 as permitted sender) smtp.mailfrom=rfg@tristatelogic.com X-Spamd-Result: default: False [0.70 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[tristatelogic.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[fastmail.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:14051, ipnet:69.62.128.0/17, country:US]; SUBJECT_ENDS_QUESTION(1.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2020 03:23:12 -0000 In message , Yuri Pankov wrote: >No, it's not that bug after all. The issue is that (n)vi now (for quite >some time :-) defaults to UTF-8 when it can't reliably detect the file >encoding, so you'll just have to help it a bit adding the following to >~/.nexrc: > >set fileencoding=iso8859-1 > >This way (n)vi will check if file encoding looks like UTF-8, and if not, >it will use ISO8859-1 as fallback. Ahhhhhh... I did what you said and yes, that fixed it! Thanks ever so much! This has been bugging me fofr quite awile. And my apologies for being to lazy/preoccupied to dredge deeply enough into the man pages to be able to find this solution on my own. If you were my fairy godmother, then I'd ask you to grant me one more wish, which would be to have (n)vi always be able to automagically correctly detect the content encoding in any given file it is asked to load. But you're not, so I won't. :-) Still, it seems like it out to be possible to do. It appears that a hnuman (you) didn't have much trouble figuring out the correct encoding type in this instance, so one would think that this one piece of software might be able to do a better job in this particular guessing game. (Should I bother to submit a PR / enhancement request for that?) Regards, rfg