microsoft / microsoft/PowerToys

[Quick Accent] Deprecate UnicodeInformation package and use icuuc.dll calls

Open
#47,239 0 comments 0 reactions 1 assignee Claimed by @daverayment View on GitHub
Needs-Triage Product-Quick Accent
Dominant language
C
Stars
139k
Forks
8.6k
PR merge metrics
PR metrics pending

Description

### Description of the new feature / enhancement

We use the **UnicodeInformation** package to show an optional descriptive tip about the user's selection in the Quick Accent popup:

Image

The package was last updated nearly 3 years ago, bundling a static Unicode 13 database, and is large (7.4 MB). The latest Unicode standard is version 17.

We can replace it with calls to `icuuc.dll`, which includes a superset of the same Unicode code point descriptive information. There will need to be a few lines of code to handle multi-code-point characters, but that is straightforward. `icuuc.dll` is included as standard in Windows, is serviced via Windows Update when new characters are added or updated, and is compatible with the earliest version of Windows 10 that we support.

### Scenario when this would be used?

Whenever Quick Accent is triggered. There is no change to functionality, just a removal of the existing **UnicodeInformation** package and a reduction in PowerToys' build size. Looking forward, this will also allow us to support future user-defined character sets more reliably.

### Supporting information

See https://www.nuget.org/packages/UnicodeInformation for package details.

See https://learn.microsoft.com/en-us/windows/win32/intl/international-components-for-unicode--icu- for information about Windows version compatibility.

Unicode 17: https://www.unicode.org/versions/Unicode17.0.0/

### Proof of concept

This shows a test using the `icu.dll` `u_charName` function:

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.