On Fri Sep 15 10:53:50 2023 +0000, Dmitry Timoshkov wrote:
It would need tests with other Unicode space characters (u00a0, u3000, etc.) to show that iswspace() is the right thing to use.
This patch is about avoiding truncation of unicode chararacters (in my case it's 0x420) to 'char'. If iswspace() is not covering full unicode range, and something else should be used instead (like IsCharSpaceW()) that could be a separate change with appropriate tests. I can look at it later, if desired. Does that sound acceptable?
You are already adding tests, it doesn't seem hard to extend them to other space characters. Otherwise you'd need to explicitly check for 0x20 since that's the only thing that's tested.