We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1069 - SDL_iconv: UTF-8 to UCS-2 conversion error
Summary: SDL_iconv: UTF-8 to UCS-2 conversion error
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: 1.2.14
Hardware: All All
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-23 07:33 UTC by Alexander Iljin
Modified: 2011-04-17 19:18 UTC (History)
1 user (show)

See Also:


Attachments
Delphi project source demonstrating the bug (2.13 KB, text/plain)
2010-10-23 07:33 UTC, Alexander Iljin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Iljin 2010-10-23 07:33:56 UTC
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
---------------------------
����������������
---------------------------
ОК   
---------------------------
Comment 1 Jen Spradlin 2011-04-12 20:09:59 UTC
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!
Comment 2 Alexander Iljin 2011-04-12 21:29:21 UTC
> 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?
Comment 3 Alexander Iljin 2011-04-17 19:18:34 UTC
(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!