Re: [PATCH] ansic*: reduce multibyte function calls
From:
Chet Ramey
Subject:
Re: [PATCH] ansic*: reduce multibyte function calls
Date:
Wed, 22 Oct 2025 16:43:33 -0400
User-agent:
Mozilla Thunderbird
On 10/22/25 1:41 PM, Grisha Levit wrote:
In the ansic* functions, if HANDLE_MULTIBYTE is defined, we end up
calling mbrtowc for non-"basic" characters in singlebyte locales.
While this is not incorrect (Android's broken implementation aside),
we can optimize by being more selective about when to call mbrtowc.
Thanks for the patch.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/