| Summary: | SDL_iconv_string fails on Ubuntu locale... | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ryan C. Gordon <icculus> |
| Component: | *don't know* | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P1 | ||
| Version: | 1.2.11 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Attachments: | Proposed fix. | ||
|
Description
Ryan C. Gordon
2007-07-12 00:03:37 UTC
Flagging as P1 for the 1.2.12 release, since this basically breaks SDL_WM_SetCaption() on every modern Linux box. :/ --ryan. Created attachment 224 [details]
Proposed fix.
Here's a shot at fixing this. I'm not sure if this is the right approach, or covers all reasonable strings, but it works here.
--ryan.
Tossing to Sam. Please apply that patch if you think it's reasonable. --ryan. I have another idea. Apparently passing "" to iconv_open indicates the locale dependent encoding. I'll play with this a bit. This is fixed in revision 3234, thanks! I applied your patch to the built-in version of iconv_open(). Thanks! BTW, the semantics of strstr are really dangerous. As you can see by the bug in your patch... :) But I guess it's the best you can do without being able to have both const and non-const versions of a function. Semantics of strchr even. :) |