From nobody Sat Jul 01 08:53:49 2023 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QtQw13js4z4js2V for ; Sat, 1 Jul 2023 08:53:53 +0000 (UTC) (envelope-from yuri@aetern.org) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QtQw10BVKz4LsN; Sat, 1 Jul 2023 08:53:52 +0000 (UTC) (envelope-from yuri@aetern.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=aetern.org header.s=fm2 header.b="N jJeftP"; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=I3xsFaQ7; spf=pass (mx1.freebsd.org: domain of yuri@aetern.org designates 66.111.4.28 as permitted sender) smtp.mailfrom=yuri@aetern.org Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 0F9E55C01DD; Sat, 1 Jul 2023 04:53:52 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sat, 01 Jul 2023 04:53:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aetern.org; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:message-id:mime-version:reply-to :sender:subject:subject:to:to; s=fm2; t=1688201632; x= 1688288032; bh=S7lwog4uXd42R1BRdFxorBehiQaVgThevqw1esDoXGk=; b=N jJeftPN6uX+K4hVU2nf6oU4QE+EZ8QLaEMFo7RMBaXy1QnM19O8PVPdRq6YDwEiK NszwZK/fSWmXclB9ulPcdJvZuEa14XnfD1FygflhualIFYjdNhfzDyE/3bWwcjYB P0a5OyMs+MMIUUKyE/7eQ+KsFLv0Sz4FGVqn7R8+TNKEiwdhg+DTfPwe7P/gJw/Q y83v+MMXNaEq+LXMnX/7BDAor2r7+jLr4xscF7OP1AQ4Ss59k3iasYDc8CN6a7Rr j8fMk3mIohrbPPJGlB70zFVJPE95Km8dlgJ/3JvoLpkkZJtDOjnzb/VCZpFaIw6B lxCxHONcX/6Wv2XZCD4MA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1688201632; x=1688288032; bh=S 7lwog4uXd42R1BRdFxorBehiQaVgThevqw1esDoXGk=; b=I3xsFaQ7gAYWuOHpl xwq4dvKsfEDrto+nIQdXamxZ6a5Ty2S52yHBKeWGI+fdT45Fzj39P196w4JEe/6A 3muDi8nfaG0gOlwXwAy4BnF5ynszrwu/2YNNE4unggqam+fCTTF3CR5XkDFlf6A0 jMzvIvJ4zcFJJIClQg1Y3UlcnEeUkWbfkOw7giQcMvXe3KRFUxpXgv3ZraZTz8xY S48mSfITqpA0Nh9vIkxwcuKRoS8kFN6Bfb4cub4l+iHJB9uZzXbtkcDjHSDpbnHz A4ELPkqp2PLRHzMycBQEBpDk32mVtkxpXjEEVOcdW144Yrp+C1WIDPnTmQy5VwhU 0pNfg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrtdekgddtjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfvffhufevtgfgsehtjeertd dtfeejnecuhfhrohhmpegjuhhrihcuoeihuhhrihesrggvthgvrhhnrdhorhhgqeenucgg tffrrghtthgvrhhnpefgvdefffdukeffkeevudefvdetgffgkeekieefffeffefhteekje ehudfgffevheenucffohhmrghinhepfhhrvggvsghsugdrohhrghenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeihuhhrihesrggvthgvrhhnrd horhhg X-ME-Proxy: Feedback-ID: i0d79475b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 1 Jul 2023 04:53:51 -0400 (EDT) Message-ID: <7c2648bf-158d-d7c9-a68a-fcadf7004014@aetern.org> Date: Sat, 1 Jul 2023 10:53:49 +0200 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US To: Ed Schouten From: Yuri Subject: motivation for iconv versions of mbrtocXX functions Cc: current@FreeBSD.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4QtQw10BVKz4LsN X-Spamd-Bar: / X-Spamd-Result: default: False [-0.40 / 15.00]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.28]; R_DKIM_ALLOW(-0.20)[aetern.org:s=fm2,messagingengine.com:s=fm2]; ASN(0.00)[asn:19151, ipnet:66.111.4.0/24, country:US]; DKIM_TRACE(0.00)[aetern.org:+,messagingengine.com:+]; local_wl_from(0.00)[yuri@aetern.org] X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: local_wl_from X-ThisMailContainsUnwantedMimeParts: N (also CC'ed current@ in case anyone else knows the answer) Hi Ed, Looking at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272293, I noticed that non-iconv implementations of mbrtoc16/32 work correctly for the provided test case, and before digging deeper into the issue with iconv ones, I would like the initial motivation here, i.e. do you remember what issues exactly did you see without iconv? commit 49111f0092c9eff1bc03d95c7ca6275dc677b273 Author: Ed Schouten Date: Mon Jun 3 17:17:56 2013 +0000 Add libiconv based versions of *c16*() and *c32*(). I initially thought wchar_t was locale independent, but this seems to be only the case on Linux. This means that we cannot depend on the *wc*() routines to implement *c16*() and *c32*(). Instead, use the Citrus libiconv that is part of libc.