| Summary: | SDL_iconv: UTF-8 to UCS-2 conversion error | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Alexander Iljin <ajsoft> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | jspradlin |
| Version: | 1.2.14 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | Delphi project source demonstrating the bug | ||
Thank you for your bug report! We're busy working on getting SDL 1.3 ready for a high quality release, and want to make sure as many things are fixed there as possible. Could you check to see if your bug is resolved by the latest SDL 1.3 snapshot? http://www.libsdl.org/tmp/SDL-1.3.zip Thanks! > Could you check to see if your bug is resolved by the latest SDL 1.3 snapshot?
> http://www.libsdl.org/tmp/SDL-1.3.zip
I'll be glad to help you make sure the bug is fixed, but I can only test against a compiled DLL. I've got no tools to build SDL from source. Can you give me a link to a nightly build or some such?
(In reply to comment #1) > Could you check to see if your bug is resolved by the latest SDL 1.3 snapshot? > http://www.libsdl.org/tmp/SDL-1.3.zip A friend of mine built the DLL for me and I confirm that the bug is no longer there. Good job! |
Created attachment 542 [details] Delphi project source demonstrating the bug I tried to use SDL_WM_SetCaption. I passed it some UTF-8 encoded Russian text, but got question marks in the window caption. (I tried both WITH and WITHOUT the BOM header. The byte order mark was correctly removed from the text, but the rest of the text was still the same set of "invalid character" symbols.) I traced the problem down to SDL_iconv incorrectly processing the string. The attached Delphi project demonstrates that WinApi correctly handles the sample text, while SDL_iconv_string returns the question marks. The test project currently shows the following two messages for the same input data: --------------------------- WinApi result --------------------------- АБВГДЕЖЗИЙКЛМНОП --------------------------- ОК --------------------------- --------------------------- SDL result --------------------------- ���������������� --------------------------- ОК ---------------------------