[PATCH] Wide Unicode Input Support

Hello,
The patch adds supports for wide unicode input in SDL.
Without the patch, if you tried to input a multibyte character the variable:
SDL_Event.event.key.keysym.unicode
would be zero.

This bug is in the BUGS file:
Wide UNICODE character input (Kanji, etc.) is not yet supported.
It requires handling of keyboard mapping events and using the XIM
input translation extension. I will implement it as requested.
Latin-1 keyboard input works fine.

This was done by implementing the IM protocol for X-based platforms only
and hence it doesn’t fix the problem for the MS Windows platform.
Could you please Sam explain if it is possible to fix this on MS Windows 9x
without using ToUnicode()?

A screenshot showing Example 3.11 from the documentation
http://sdldoc.csn.ul.ie/guideinputkeyboard.php
(with a modification to allow for printing unicode characters > 0x80
using utf8) with some Arabic
input (not that unicode values are now correct) is here:
http://mhdyousif.host.sk/files/sdlwideinput.jpg

Thanks.–
Mohammed Yousif
Egypt

-------------- next part --------------
A non-text attachment was scrubbed…
Name: sdlwideinput.patch
Type: text/x-diff
Size: 17740 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040611/a90e876f/attachment.patch

Hi,
Any progress on this one?
I know you are busy, this is just a reminder in case it got lost.On ??? 11 ??? 2004 00:49, Mohammed Yousif wrote:

Hello,
The patch adds supports for wide unicode input in SDL.
Without the patch, if you tried to input a multibyte character the
variable: SDL_Event.event.key.keysym.unicode
would be zero.

This bug is in the BUGS file:
Wide UNICODE character input (Kanji, etc.) is not yet supported.
It requires handling of keyboard mapping events and using the XIM
input translation extension. I will implement it as requested.
Latin-1 keyboard input works fine.

This was done by implementing the IM protocol for X-based platforms only
and hence it doesn’t fix the problem for the MS Windows platform.
Could you please Sam explain if it is possible to fix this on MS Windows
9x without using ToUnicode()?

A screenshot showing Example 3.11 from the documentation
http://sdldoc.csn.ul.ie/guideinputkeyboard.php
(with a modification to allow for printing unicode characters > 0x80
using utf8) with some Arabic
input (not that unicode values are now correct) is here:
http://mhdyousif.host.sk/files/sdlwideinput.jpg

Thanks.


Mohammed Yousif
Egypt

Mohammed Yousif wrote:

Hi,
Any progress on this one?
I know you are busy, this is just a reminder in case it got lost.

If you have searched archives enough prior to putting effort into your patch,
you would have found my patch that added XKB support to the SDL X11 backend.

I frankly don’t know if XKB supports arabic, because I was concerned with
cyrillic support only. However, I have yet to see an X server with XIM
configured, every single one I’ve seen is using XKB.

Perhaps it would be most appropriate to combine our patches and push heavily
for its inclusion. What’s your opinion?–

./lxnt

Mohammed Yousif wrote:

Hi,
Any progress on this one?
I know you are busy, this is just a reminder in case it got lost.

If you have searched archives enough prior to putting effort into your patch,
you would have found my patch that added XKB support to the SDL X11 backend.

I frankly don’t know if XKB supports arabic, because I was concerned with
cyrillic support only. However, I have yet to see an X server with XIM
configured, every single one I’ve seen is using XKB.

Perhaps it would be most appropriate to combine our patches and push heavily
for its inclusion. What’s your opinion?

Go for it! I’d love to see a patch with you guys working together.
My biggest question is does this support the asian (and other multi-byte)
languages?

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment