| Summary: | Unquoted Unicode argument parsing broken on Windows due to incorrect usage of SDL_isspace() | ||
|---|---|---|---|
| Product: | SDL | Reporter: | mednafen |
| Component: | main | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | Windows (All) | ||
|
Description
mednafen
2018-02-08 14:44:20 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?
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. Fixed, thanks! https://hg.libsdl.org/SDL/rev/bd4899381cbd |