Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some ansi RichEdit window classes return unicode text when asking for a range #17

Closed
nvaccessAuto opened this issue Jan 1, 2010 · 1 comment
Labels
Milestone

Comments

@nvaccessAuto
Copy link

Reported by mdcurran on 2007-11-29 05:04
Some windows that have a class such as RichEdit20 (registered as ansi, not unicode) give back unicode text when sending them an EM_GETTEXTRANGE message.
It doesn't seem to matter whether you use sendMessageW or sendMessageA, they both still end up returning unicode text.
The problem with this is that NVDA assumes that if a RichEdit window class is not unicode, then the text returned will be ansi. But, not all window classes seem to follow this rule.
This problem is evident in the Jarte text editor, where its RichEdit20 (ansi) control gives back unicode text, therefore when reading by word or line (anything else other than character) only the first character is announced as the second character usually will be 0x0, as the text is really unicode, not ansi.
To fix this, we could just assume all richEdit controls give back unicode text, though I'm sure this is not the case for some.
Certainly RichEdit20A gives back ansi, so we could just make an exception for RichEdit20 itself. Though I also have a feeling that its not actually the fault of the window class, but the fault of the application that wrongly implements the handlers for the control.
More research needs to be done on this problem, I have seen mention of it around on the net before.
Perhaps we could make a Jarte appModule which forces that particular control to be treeted as unicode, though this would get rather silly if other apps started also showing this problem.

@nvaccessAuto
Copy link
Author

Comment 1 by mdcurran on 2007-11-29 11:16
Fixed in r1371. We firstly retreave the text as a byte array. If there is a non-0 byte value where the ansi NULL character should be, this is clearly unicode text so treet it as so. This could break with some double-byte ansi character sets, however until we can correctly identify a window's locale, we can't do anything about this anyway.
Changes:
State: closed

@nvaccessAuto nvaccessAuto added this to the 2009.1 milestone Nov 10, 2015
seanbudd added a commit that referenced this issue Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant