russellallen / self

Making the world safe for objects
http://selflanguage.org
707 stars 76 forks source link

Feature/utf8 input #120

Closed Bystroushaak closed 2 months ago

Bystroushaak commented 7 years ago

I've added UTF-8 input support (#113) under Xlib. Changes are explained in commit messages.

I am not so sure about the XICCache class, I've made for tracking XIM / XIC values for each X window. Some mechanism like this is required, but I can't stop feeling that this is inelegant solution. Also I am not sure about the XIM / XIC structures used in this class, because I've forgot half of C++ and I have strange feeling, that it would be better with pointers. And I have no idea whether they are properly destroyed or whether they are copied in memory too many times with each method call or what. Sorry. Someone please optimize this, if it is inefficient or leaks memory.

But the input works! I am now able to type into Self in my native language, with combining (dead) keys and all the glory:

Příšerně žluťoučký kůň pěl ďábelské ódy.

(Yes, this was typed into Self and then copied out.)