We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4073

Summary: Unquoted Unicode argument parsing broken on Windows due to incorrect usage of SDL_isspace()
Product: SDL Reporter: mednafen
Component: mainAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: Windows (All)   

Comment 1 Sam Lantinga 2018-02-09 23:22:54 UTC
SDL_isspace() is implemented as:
int SDL_isspace(int x) { return ((x) == ' ') || ((x) == '\t') || ((x) == '\r') || ((x) == '\n') || ((x) == '\f') || ((x) == '\v'); }

None of those depend on the character being an unsigned char.

In fact, SDL typically handles Unicode input as UTF-8.

What is your use case?
Comment 2 mednafen 2018-02-10 00:14:42 UTC
That is not the way SDL_isspace() is implemented when HAVE_CTYPE_H is defined by the configure script when compiling with mingw-w64 and gcc.
Comment 3 Sam Lantinga 2018-02-10 20:43:59 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/bd4899381cbd