bug#79824: fmt not correctly process text with UTF-8 characters encoding

Collin Funk <[email protected]> Wed, 12 Nov 2025 14:29:10 -0800
Newsgroups gmane.comp.gnu.core-utils.bugs
Message-ID <[email protected]>
Pádraig Brady <[email protected]> writes:

> On 12/11/2025 15:14, Воронов Андрей Александрович wrote:
>> Good evening,
>> When I run the fmt to make a text with default 75 columns width it
>> properly convert only the Latin letters from ASCII.
>> Russian & possible other not English/Latin (Greek, Cyrillic) characters which stored in two bytes in UTF-8 encoding
>> are shorter 2 times accordingly.
>
> Yes this is a known issue which we're gradually getting to.

I can have a look at it using mbbuf_t in a similar way to 'fold'.

I think 'fmt' is similar, in that it does not matter much if it is a bit
slower. Handling unicode characters is more important, IMO.

Collin