Date: Thu, 29 Nov 2018 15:07:59 +0000 (UTC) From: Yuri Pankov <yuripv@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341235 - stable/11/contrib/nvi/common Message-ID: <201811291507.wATF7xRU083310@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yuripv Date: Thu Nov 29 15:07:59 2018 New Revision: 341235 URL: https://svnweb.freebsd.org/changeset/base/341235 Log: MFC r340976: vi: fix UTF-8 detection. PR: 202290 Submitted by: lampa@fit.vutbr.cz Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D17950 Modified: stable/11/contrib/nvi/common/encoding.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/nvi/common/encoding.c ============================================================================== --- stable/11/contrib/nvi/common/encoding.c Thu Nov 29 15:05:47 2018 (r341234) +++ stable/11/contrib/nvi/common/encoding.c Thu Nov 29 15:07:59 2018 (r341235) @@ -96,7 +96,7 @@ looks_utf8(const char *ibuf, size_t nbytes) if (i >= nbytes) goto done; - if (buf[i] & 0x40) /* 10xxxxxx */ + if ((buf[i] & 0xc0) != 0x80) /* 10xxxxxx */ return -1; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811291507.wATF7xRU083310>