bug#79497: fmt breaks lines when it does not need to

Bruno Haible via GNU coreutils Bug Reports <[email protected]>
Newsgroups gmane.comp.gnu.core-utils.bugs
Organization GNU
Message-ID <2419308.IPqQCg1nHW@nimes>
Hi,

With the attached input file and coreutils-9.8, I see these
results from the 'fmt' command, in the en_US.UTF-8 locale
on a GNU system:

$ fmt -w 12 -g 12 input.txt
Grüß
Gott.
Здравствуйте!
x=(-b±sqrt(b²-4ac))/(2a)
日本語,中文,한글
$ fmt -w 13 -g 13 input.txt
Grüß Gott.
Здравствуйте!
x=(-b±sqrt(b²-4ac))/(2a)
日本語,中文,한글

Why does it take a width of 13, in order to keep the first two words
on a single line? That line has width 10.

I would expect that already 'fmt -w 10 -g 10 input.txt' keeps these
two words together.

Bruno
input.txt (text/plain, 91 B)
Grüß Gott. Здравствуйте! x=(-b±sqrt(b²-4ac))/(2a)  日本語,中文,한글
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.