Re: UTF-8 by default?

From: Don Lewis <truckman_at_FreeBSD.org>
Date: Wed, 20 Jul 2016 13:23:46 -0700 (PDT)
On 20 Jul, Tim Čas wrote:
> On 20 July 2016 at 20:33, Don Lewis <truckman_at_freebsd.org> wrote:
>> wc(1) has problems with its multibyte support pointed out by Coverity
>> as I recall.
> 
> Not sure how critical that issue is (e.g. byte counts [`-c`], line
> counts [`-l`], and such should still work as intended; whether word
> counts work or not depends on whether we should count Unicode
> whitespace as, well, whitespace). I do wonder if everyone agrees that
> an effort should be made towards UTF-8 default, though?

It passes a fixed-length non-NUL terminated buffer (returned by read(2))
to mbrtowc().  In addition to the lack of termination, the buffer could
also contain a partial character at its beginning or end if the contents
are UTF-8.

The Coverity ID is 978825.
Received on Wed Jul 20 2016 - 18:23:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:06 UTC