bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#54124: fmt inserts garbage in certain cases?


From: Paul Eggert
Subject: bug#54124: fmt inserts garbage in certain cases?
Date: Wed, 23 Feb 2022 19:06:29 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 2/23/22 17:29, Pádraig Brady wrote:
Given isspace('\n') returns true, then it makes some sense that isspace("Next Line")
would return true,

POSIX says that the application must insure that argument to isspace is either EOF or "a character representable as an unsigned char", and arguably since 0x85 not either one of those things the behavior of isspace(0x85) is undefined.

However, the C standard does not have this wording, and since POSIX is supposed to defer to the C standard here, this appears to be a bug in POSIX (as well as a bug in macOS). It's understandable if the Apple C library's developers got confused by the POSIX wording.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]