Skip to content
Prev 61025 / 63421 Next

Problem with accessibility in R 4.2.0 and 4.2.1.

On 9/22/22 18:24, peter dalgaard wrote:
Yes, that's almost surely related. GraphApp uses very different code for 
handling Windows messages in a multi-byte locale and single-byte locale, 
so switching to UTF-8 changed a lot. The multi-byte version hasn't been 
used that much before, and hence a number of bugs showed up after the 
switch.
There were two issues reported already with other software controlling a 
running window of Rgui, one was fixed in 4.2.1 (SendInput() for text 
injection didn't work in a multi-byte locale). Another hopefully was 
fixed in the application (it was using WM_CHAR messages to inject text, 
but that is not the right way to do this and fixing that to work as 
before would bee too difficult; the way recommended by Microsoft is 
SendInput, which now works).

It would be good if we could debug and fix this, on either end. For that 
we need to find out how the concrete screen reading applications 
communicate with Rgui window. Ideally I would have a tiny example which 
I could build and run on my Windows machine, without any special 
hardware, which would demonstrate the problem. Or, at least if the 
source code is available and we could have a look. Even if the 
application is closed source, the Windows messages could be captured by 
some tracing software to debug the protocol, and one could try writing 
an example/reproduction of the problem based on that.

Hopefully someone reading this could help with producing such an 
example, and then I could try investigating why it stopped working and 
fix, if possible.

In principle, we cannot yet assume that all Windows systems are new 
enough to support UTF-8 as the system encoding (also called ACP in 
Windows), so R support for running on Windows in a single-byte locale 
still cannot be removed, it will almost surely stay at least in 4.3. So, 
what I could definitely do is create an alternative build of Rgui which 
will use single-byte locale (like the older versions of R) even on new 
Windows systems. That alternatively build might be removed later if we 
decide to require UTF-8, but, temporarily it might help. Still, I hope 
we can debug and fix this to work properly when R is running with UTF-8 
as the native encoding.

I hope for now you can get away with 4.1.3. In principle, building Rgui 
to run R using single-byte locale is trivial (one just changes the 
manifest file for Rgui), so if a temporary solution was needed very 
fast, one can just do that and have a custom build before any new R 
release. Also, well, an older version of Windows 10 (or even older 
Windows) that don't support UTF-8 as the native encoding would do the same.

Best
Tomas