You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closes#18722
Reverts 021bcd8
Summary of the issue:
The code that split a string at character boundaries discarded characters like \u0301 when such a character was the only character in a string.
Description of user facing changes:
When unicode normalization is on, navigating by character will again correctly announce characters like acute (\u0301)
Description of developer facing changes:
NVDAHelper local calculateCharacterBoundaries now needs an offsets array that is textLength + 1 in size, rather than only the text length. This is to store the end offset of the last character.
This reverts 021bcd8, therefore we don't pass additional extraneous alphanumeric characters to uniscribe to make it happy.
Description of development approach:
While debugging this issue, I found several issues in NVDAHelper local textUtils _getLogAttrArray function that is the base of the several calculation functions:
The buffer passed to ScriptItemize was too small when a string only contained one character. The buffer should have space for at least two SCRIPT_ITEM structures in size. This is my hypothesis about the necessity of 021bcd8, namely the addition of two alphanumeric characters passed to the uniscribe methods. While there are no exactly known str to reproduce the issue behind 021bcd8, I tried several combinations of shorter and longer strings without alpha numeric characters, and I couldn't reproduce any of the behavior described in it after my changes to the c++ code. Therefore I reverted 021bcd8, as there is enough time to test this in Alpha thoroughly.
Calculation of character offsets would never set the end offset when requesting the offsets of the last character in the string, since the end offset calculation starts at offset + 1 and offset + 1 is equal to textLength.
Failed calls of ScriptItemize and ScriptBreak were never logged. ScriptItemize definitely failed when passing a string with only one character in it because the expected buffer was to small.
Copy file name to clipboardExpand all lines: user_docs/en/changes.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,8 @@ This can be enabled using the "Report when lists support multiple selection" set
20
20
21
21
### Bug Fixes
22
22
23
+
* When unicode normalization is enabled for speech, navigating by character will again correctly announce combining diacritic characters like acute ( ́ ). (#18722, @LeonarddeR)
24
+
23
25
### Changes for Developers
24
26
25
27
Please refer to [the developer guide](https://download.nvaccess.org/documentation/developerGuide.html#API) for information on NVDA's API deprecation and removal process.
0 commit comments