From owner-sc22wg14+sc22wg14-domo2=www.open-std.org@open-std.org  Sat Mar 28 20:48:24 2020
Return-Path: <owner-sc22wg14+sc22wg14-domo2=www.open-std.org@open-std.org>
X-Original-To: sc22wg14-domo2
Delivered-To: sc22wg14-domo2@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id EFDAB9DB16D; Sat, 28 Mar 2020 20:48:23 +0100 (CET)
Delivered-To: sc22wg14@open-std.org
Received: from smtp88.iad3a.emailsrvr.com (smtp88.iad3a.emailsrvr.com [173.203.187.88])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by www.open-std.org (Postfix) with ESMTP id B1F09358D3B
	for <sc22wg14@open-std.org>; Sat, 28 Mar 2020 20:48:22 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=honermann.net;
	s=20180930-2j89z3ji; t=1585424901;
	bh=jHwoRd6S5N02p1Vmd7DvYOfyX4S/2DXSB4YSKYAl2vE=;
	h=Subject:To:From:Date:From;
	b=n7Ae61x6+FWO9xxwQctA6ks/73k1bma6g6OKzumkNtYiyPmheufGEmeEtE8GhA8RX
	 fA1Ku/8FNi/aayeh8uMaaQve3QWVpK9adQDTYBCmv6c5pSPdBmWI7gXtPyLpJMyw8S
	 r0GExg8FnG3hPShFtVLx+U+nsCdae+KFQ8NLy/i4=
X-Auth-ID: tom@honermann.net
Received: by smtp20.relay.iad3a.emailsrvr.com (Authenticated sender: tom-AT-honermann.net) with ESMTPSA id 8A6B324880;
	Sat, 28 Mar 2020 15:48:21 -0400 (EDT)
X-Sender-Id: tom@honermann.net
Received: from [192.168.1.13] (pool-74-110-208-227.rcmdva.fios.verizon.net [74.110.208.227])
	(using TLSv1.2 with cipher DHE-RSA-AES128-SHA)
	by 0.0.0.0:587 (trex/5.7.12);
	Sat, 28 Mar 2020 15:48:21 -0400
Subject: Re: (SC22WG14.17684) mbrtowc() wording ambiguities and surprising
 implementation behavior
To: Florian Weimer <fweimer@redhat.com>
Cc: wg14 <sc22wg14@open-std.org>, SG16 <sg16@lists.isocpp.org>
References: <20200328044149.75FAD3589AA@www.open-std.org>
 <20200328142924.1B4ED3589A5@www.open-std.org>
From: Tom Honermann <tom@honermann.net>
Message-ID: <92ab2dac-c1e2-ef5f-2b96-9108ca6f8c9e@honermann.net>
Date: Sat, 28 Mar 2020 15:48:21 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.4.1
MIME-Version: 1.0
In-Reply-To: <20200328142924.1B4ED3589A5@www.open-std.org>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-Classification-ID: 978d97be-c584-43af-a291-d3935e22f175-1-1
Sender: owner-sc22wg14@open-std.org
Precedence: bulk

On 3/28/20 10:23 AM, Florian Weimer wrote:
> * Tom Honermann:
>
>> I came across the following issues while testing an implementation of mbrtoc8() [1] I'm
>> working on.  The implementation uses mbrtowc() internally.
>>
>> The issues concern the return value of mbrtowc() in two related
>> scenarios.
> I think I raised a similar issue a while back:
>
> From: Florian Weimer <fweimer@redhat.com>
> Subject: (SC22WG14.16670) One multibyte sequences, multiple wide characters
> To: sc22wg14 <sc22wg14@open-std.org>
> Date: Wed, 08 May 2019 14:15:20 +0200
> Message-Id: <20190508121530.E64BA35669A@www.open-std.org>

Thanks, that archived message is available at 
http://open-std.org/jtc1/sc22/wg14/16670.  And yes, that does match one 
of the issues I described.

>
> Other feedback I received regarding this issue is that Big5 is simply
> not an enconding supported by ISO C.

That aligns with Hubert's response.  As mentioned in my response to him, 
I think this is a case where it would make sense to change the C 
standard to better match existing practice.

Tom.

>
> Thanks,
> Florian
>

