<p>Older VM should continue to work with 5.3 image.<br>
The questionnable part is the fallback code that we use in UTF32InputInterpreter whenever (evt->utf32Code) is NULL.<br>
It still perform something like <code>(evt->charCode) macToSqueak</code> which is questionable both on Windows and Linux:</p>
<ul>
<li>I removed the conversion to macRoman from windows <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="455436549" data-permission-text="Issue title is private" data-url="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/403" data-hovercard-type="pull_request" data-hovercard-url="/OpenSmalltalk/opensmalltalk-vm/pull/403/hovercard" href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/403">#403</a></li>
<li>linux still use this macRoman conversion by default, but this can be changed by either vm command line option or environment variable...</li>
</ul>
<p>I propose that we clean-up after 5.3 release.</p>
<hr>
<p><strong>Some reverse engineering details about unix charCode journey:</strong></p>
<p>See usage of <code>sqTextEncoding</code>global variable:<br>
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/search?q=sqTextEncoding&unscoped_q=sqTextEncoding">https://github.com/OpenSmalltalk/opensmalltalk-vm/search?q=sqTextEncoding&unscoped_q=sqTextEncoding</a></p>
<p>The <code>charCode</code> is transformed by <code>recode</code> function here:<br>
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/7875a84c55aaf2ab56ce4b242782b74d7c93d3c7/platforms/unix/vm-display-X11/sqUnixX11.c#L1385">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/7875a84c55aaf2ab56ce4b242782b74d7c93d3c7/platforms/unix/vm-display-X11/sqUnixX11.c#L1385</a></p>
<p><code>recode</code> is used by <code>x2sqKeyPlain</code>  <code>x2sqKeyCompositionInput</code> and <code>x2sqKeyInput</code> functions<br>
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/7875a84c55aaf2ab56ce4b242782b74d7c93d3c7/platforms/unix/vm-display-X11/sqUnixX11.c#L2078">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/7875a84c55aaf2ab56ce4b242782b74d7c93d3c7/platforms/unix/vm-display-X11/sqUnixX11.c#L2078</a><br>
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/7875a84c55aaf2ab56ce4b242782b74d7c93d3c7/platforms/unix/vm-display-X11/sqUnixX11.c#L1989">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/7875a84c55aaf2ab56ce4b242782b74d7c93d3c7/platforms/unix/vm-display-X11/sqUnixX11.c#L1989</a><br>
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/7875a84c55aaf2ab56ce4b242782b74d7c93d3c7/platforms/unix/vm-display-X11/sqUnixX11.c#L1884">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/7875a84c55aaf2ab56ce4b242782b74d7c93d3c7/platforms/unix/vm-display-X11/sqUnixX11.c#L1884</a></p>
<p>Those functions are used as the <code>x2sqKey</code> function.<br>
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/7875a84c55aaf2ab56ce4b242782b74d7c93d3c7/platforms/unix/vm-display-X11/sqUnixX11.c#L261">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/7875a84c55aaf2ab56ce4b242782b74d7c93d3c7/platforms/unix/vm-display-X11/sqUnixX11.c#L261</a></p>
<p><code>x2sqKey</code>function is used in <code>handleEvent</code> function for <code>KeyPress</code> and <code>KeyRelease</code> events (also mouse wheel, but that's a detail)<br>
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/7875a84c55aaf2ab56ce4b242782b74d7c93d3c7/platforms/unix/vm-display-X11/sqUnixX11.c#L3757">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/7875a84c55aaf2ab56ce4b242782b74d7c93d3c7/platforms/unix/vm-display-X11/sqUnixX11.c#L3757</a><br>
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/7875a84c55aaf2ab56ce4b242782b74d7c93d3c7/platforms/unix/vm-display-X11/sqUnixX11.c#L3859">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/7875a84c55aaf2ab56ce4b242782b74d7c93d3c7/platforms/unix/vm-display-X11/sqUnixX11.c#L3859</a></p>
<p>This <code>keyCode</code> will finally fill the event structure via <code>recordKeyboardEvent</code> function:<br>
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/aed5e3391301011cc6b9ee6a353ee563f4ab6dbd/platforms/unix/vm/sqUnixEvent.c#L204">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/aed5e3391301011cc6b9ee6a353ee563f4ab6dbd/platforms/unix/vm/sqUnixEvent.c#L204</a></p>
<p>Note that <code>sqTextEncoding</code> is also used thru this line that define <code>ux2sqText</code><br>
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/5baff07526c73fdfb813fc8022d88f73faa823c4/platforms/unix/vm/sqUnixCharConv.c#L391">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/5baff07526c73fdfb813fc8022d88f73faa823c4/platforms/unix/vm/sqUnixCharConv.c#L391</a></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/449?email_source=notifications&email_token=AIJPEW7ICHXRATKCREHDD43QX5R4FA5CNFSM4JWZA4JKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGOU4YY#issuecomment-563957347">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEW3AVKR3PEEGZED6KJTQX5R4FANCNFSM4JWZA4JA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AIJPEWZHODROWK5GNQGUSO3QX5R4FA5CNFSM4JWZA4JKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGOU4YY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/449?email_source=notifications\u0026email_token=AIJPEW7ICHXRATKCREHDD43QX5R4FA5CNFSM4JWZA4JKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGOU4YY#issuecomment-563957347",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/449?email_source=notifications\u0026email_token=AIJPEW7ICHXRATKCREHDD43QX5R4FA5CNFSM4JWZA4JKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGOU4YY#issuecomment-563957347",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>