| Summary: | UNICODE File Name Failed on SDL_LoadBMP() | ||
|---|---|---|---|
| Product: | SDL | Reporter: | ddayin <ddayin> |
| Component: | file | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | ddayin |
| Version: | 1.2.13 | Keywords: | target-1.2.14 |
| Hardware: | x86 | ||
| OS: | Windows (CE)/PocketPC | ||
| Attachments: | Proposed Unicode fix for Win32 RWOPS. | ||
|
Description
ddayin
2009-04-26 19:34:36 UTC
Tagging this bug with "target-1.2.14" so we can try to resolve it for SDL 1.2.14. Please note that we may choose to resolve it as WONTFIX. This tag is largely so we have a comprehensive wishlist of bugs to examine for 1.2.14 (and so we can close bugs that we'll never fix, rather than have them live forever in Bugzilla). --ryan. Created attachment 368 [details]
Proposed Unicode fix for Win32 RWOPS.
Here's a proposed patch for allowing Unicode filenames in RWOPS on Windows. I haven't tried to compile this, as it's just proof-of-concept.
Sam, if this looks reasonable, I'll clean it up. We probably don't need this much tapdancing for 1.3, as we probably don't care about anything before Windows XP.
--ryan.
Oh, I noticed you mentioned Windows CE, where this should already work. In that case, you need to give the filename in UTF-8 format. If you try to do...
SDL_LoadBMP((char*) TEXT("Unicode File Name"));
...then it won't work.
The patch I posted should still be good, though, for desktop Windows.
--ryan.
Ryan, go ahead and make it so. I agree that this is likely to be unnecessary on 1.3, where we can just use our handy UTF8->native conversion functions and we always use the UNICODE API functions. Fixed in svn revision #4974. --ryan. |