From owner-freebsd-questions@freebsd.org Fri Apr 5 05:18:41 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71174156A15C for ; Fri, 5 Apr 2019 05:18:41 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from smh-06.1blu.de (smh-06.1blu.de [178.254.0.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C9897628B for ; Fri, 5 Apr 2019 05:18:40 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from [172.16.29.5] (helo=sh4-5.1blu.de) by smh-06.1blu.de with esmtp (Exim 4.86_2) (envelope-from ) id 1hCHFM-0002oG-1E for freebsd-questions@freebsd.org; Fri, 05 Apr 2019 07:18:36 +0200 Received: from ftp51246-2575596 by sh4-5.1blu.de with local (Exim 4.86_2) (envelope-from ) id 1hCHFL-0005wa-UK for freebsd-questions@freebsd.org; Fri, 05 Apr 2019 07:18:35 +0200 Date: Fri, 5 Apr 2019 07:18:35 +0200 From: Matthias Apitz To: freebsd-questions@freebsd.org Subject: Re: vi(1) and ISO 8859-1 Message-ID: <20190405051835.GA18093@sh4-5.1blu.de> Reply-To: Matthias Apitz Mail-Followup-To: freebsd-questions@freebsd.org References: <20190404190642.GA4609@sh4-5.1blu.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: FreeBSD 12.0-CURRENT r314251 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. User-Agent: Mutt/1.5.24 (2015-08-30) X-Rspamd-Queue-Id: 5C9897628B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.72 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[guru@unixarea.de]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[unixarea.de]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.39)[ipnet: 178.254.0.0/19(-3.85), asn: 42730(-3.08), country: DE(-0.01)]; MX_GOOD(-0.01)[cached: mail.unixarea.de]; NEURAL_HAM_SHORT(-0.22)[-0.222,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:42730, ipnet:178.254.0.0/19, country:DE]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Apr 2019 05:18:41 -0000 El día Thursday, April 04, 2019 a las 11:59:24PM +0200, Rocky Hotas escribió: > It completes successfully, exit status is 0. You can easily create such a > file and reproduce this: just open vi(1), set the encoding with > `:se fe=iso-8859-1', and just type a letter with an accent, like: I have to use ':set fileencoding=iso-88591' and with that I produced the file file-iso-8859-1.txt as: $ cat file-iso-8859-1.txt ¡Viva la Revolución! $ od -c file-iso-8859-1.txt 0000000 241 V i v a l a R e v o l u c 0000020 i 363 n ! \n 0000025 As you see, the non ASCII chars are coded in ISO. I reloaded it with 'vim file-iso-8859-1.txt' without setting the encoding, added some more chars and wrote it back as: $ od -c file-iso-8859-1.txt 0000000 241 V i v a l a R e v o l u c 0000020 i 363 n ! \n 241 V i v a l a R e 0000040 v o l u c i 363 n ! \n 0000052 and all was fine. This is with vim 8.1.555 on $ uname -a FreeBSD c720-r342378 13.0-CURRENT FreeBSD 13.0-CURRENT GENERIC amd64 -- Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub 70 years of NATO - 70 years of wars (Jugoslavia, Afghanistan, Syria, ...) and 70 years of war preparation against Russia. -- PEACE instead of NATO !