<div dir="ltr"><div>Hmm,</div><div>If I look into sendSelection() I see a dependency on localeEncoding equality:</div><div><a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/6bedd6746a0173c90751c63b0d1bdc85bf3803c4/platforms/unix/vm-display-X11/sqUnixX11.c#L761">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/6bedd6746a0173c90751c63b0d1bdc85bf3803c4/platforms/unix/vm-display-X11/sqUnixX11.c#L761</a></div><div><br></div><div>A reasonably simple scheme nowadays would be exchanging all data (clipboard, drag and drop, ...) between image and VM thru UTF8 encoding...</div><div>Of course, it's not the most optimized encoding for eastern asian languages, so we should better think twice, but this could remove considerable complexity from both VM and image (Multilingual) sides.</div><div><br></div><div>In which case, sqTextEncoding should rather be UTF8.</div><div>BUT: sqTextEncoding should ABSOLUTELY not be used for encoding platform event keycode (charCode).</div><div>As suggested in other thread, we could use platform independent keycodes.</div><div>The X11 ones are already duplicated in the VM</div><div><a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/6bedd6746a0173c90751c63b0d1bdc85bf3803c4/platforms/unix/vm-display-X11/sqUnixX11.c#L2576">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/6bedd6746a0173c90751c63b0d1bdc85bf3803c4/platforms/unix/vm-display-X11/sqUnixX11.c#L2576</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 23 déc. 2019 à 17:33, Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi all,</div><div>I'm trying to gain deeper understanding of unix keyboard events.</div><div>See <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/6bedd6746a0173c90751c63b0d1bdc85bf3803c4/platforms/unix/vm/sqUnixCharConv.c#L243" target="_blank">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/6bedd6746a0173c90751c63b0d1bdc85bf3803c4/platforms/unix/vm/sqUnixCharConv.c#L243</a></div><div>I can understand that the unix side might be governed by appropriate locale environment variable. But why changing sqTextEncoding???</div><div>sqTextEncoding is the encoding used at image side for a few things, including copy/paste buffer and keyboard event charCode (event at: 3).</div><div>Should the image side really need to follow the locale? Does it?</div><div>At least, for charCode that does not sound like the right thing!</div><div>I have fr_FR.UTF-8, so I'm getting multi-byte encoding for single byte charCode!<br></div><div></div></div>
</blockquote></div>