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 2857 - Failed to handle long IME strings
Summary: Failed to handle long IME strings
Status: RESOLVED DUPLICATE of bug 3006
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.3
Hardware: x86 Windows 8
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-25 06:42 UTC by hqm03ster
Modified: 2016-10-08 00:53 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hqm03ster 2015-01-25 06:42:25 UTC
Both SDL_TEXTEDITINGEVENT_TEXT_SIZE and SDL_TEXTINPUTEVENT_TEXT_SIZE are only 32 in size, which would fail when typing a long message in Windows IME.

To reproduce:
Open Windows 8's default Japanese IME, type "---------murasaki". The IME works correctly handling the "murasaki" part, which should have more than a few candidates. But SDL returns clipped text in both edit and input messages, resulting in the text being clipped to 10 characters.

Typing more than 32 bytes is typical in the default Microsoft IMEs which can handle very long sentences. To be completely safe, the buffer should be increased to at least 256 bytes (which is the limit of the Win 8 Microsoft Japanese IME), or at least the interface should be designed to send multiple messages (e.g. with clobbered editing, at least send enough SDL_TextInputEvents to cover all the text).
Comment 1 Sam Lantinga 2016-10-07 23:39:22 UTC
We can't increase the size much without affecting binary compatibility.
SDL_Event size = 56, SDL_TextEditingEvent size = 52
Comment 2 Sam Lantinga 2016-10-08 00:53:01 UTC
This is discussed in more detail in bug 3006

*** This bug has been marked as a duplicate of bug 3006 ***