| Summary: | sdl unicode bug on compile vc | ||
|---|---|---|---|
| Product: | SDL | Reporter: | laybor <laybor> |
| Component: | file | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus |
| Version: | 1.2.14 | ||
| Hardware: | x86 | ||
| OS: | Windows (XP) | ||
|
Description
laybor
2011-09-09 09:44:40 UTC
so SDL_LoadBMP not support chinese path.
SDL only deals with UTF-8 strings, so this won't work...
SDL_LoadBMP(L"file.bmp");
...but something like this will...
char *utf8 = SDL_iconv_string("UTF-8", "UTF-16", L"file.bmp", wcslen(L"file.bmp") + sizeof (WCHAR))
SDL_LoadBMP(utf8);
SDL_free(utf8);
This isn't an SDL bug. It's well-documented that SDL wants UTF-8 strings.
--ryan.
|