Skip to content

Speak ordinal and hex value of 32 bit unicode characters when pressing review current character three times#8995

Merged
michaelDCurran merged 1 commit into
nvaccess:masterfrom
BabbageCom:unicodeHex
Nov 30, 2018
Merged

Speak ordinal and hex value of 32 bit unicode characters when pressing review current character three times#8995
michaelDCurran merged 1 commit into
nvaccess:masterfrom
BabbageCom:unicodeHex

Conversation

@LeonarddeR

Copy link
Copy Markdown
Collaborator

Link to issue number:

None

Summary of the issue:

STR:

  1. Paste 🤦 into notepad and move to it.
  2. Press read character 3 times.

I expect to get the unicode value of the character, but I only get the emoji repeated again.

Originally posted by @tspivey in #8953 (comment)

Description of how this pull request fixes the issue:

When the ord function fails on a character and the UTF-32 encoded character is 4 bytes in size (i.e. it is really just one character), calculate the ordinal value manually. This will no longer be necessary in Python 3.

Testing performed:

Tested with several emoji

Known issues with pull request:

None

Change log entry:

None needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants