Skip to content

fix: Improve Unicode normalization and add regex metachar tests#44944

Merged
moooyo merged 2 commits intomainfrom
yuleng/rename/f/1
Jan 23, 2026
Merged

fix: Improve Unicode normalization and add regex metachar tests#44944
moooyo merged 2 commits intomainfrom
yuleng/rename/f/1

Conversation

@moooyo
Copy link
Copy Markdown
Contributor

@moooyo moooyo commented Jan 22, 2026

Enhanced SanitizeAndNormalize to handle Unicode normalization more robustly, ensuring correct buffer sizing and error handling. Added unit tests for regex metacharacters $ and ^ to verify correct replacement behavior at string boundaries. Improves Unicode support and test coverage for regex edge cases.

Summary of the Pull Request

PR Checklist

  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Enhanced SanitizeAndNormalize to handle Unicode normalization more robustly, ensuring correct buffer sizing and error handling. Added unit tests for regex metacharacters `$` and `^` to verify correct replacement behavior at string boundaries. Improves Unicode support and test coverage for regex edge cases.
@github-actions

This comment has been minimized.

@moooyo
Copy link
Copy Markdown
Contributor Author

moooyo commented Jan 22, 2026

@copilot fix spelling issue

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 22, 2026

@moooyo I've opened a new pull request, #44945, to work on those changes. Once the pull request is ready, I'll request review from you.

@moooyo
Copy link
Copy Markdown
Contributor Author

moooyo commented Jan 23, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@moooyo moooyo merged commit d192672 into main Jan 23, 2026
15 checks passed
@moooyo moooyo deleted the yuleng/rename/f/1 branch January 23, 2026 06:43
vanzue pushed a commit that referenced this pull request Jan 26, 2026
Enhanced SanitizeAndNormalize to handle Unicode normalization more
robustly, ensuring correct buffer sizing and error handling. Added unit
tests for regex metacharacters `$` and `^` to verify correct replacement
behavior at string boundaries. Improves Unicode support and test
coverage for regex edge cases.

<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #44942 #44892
<!-- - [ ] Closes: #yyy (add separate lines for additional resolved
issues) -->
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

---------

Co-authored-by: Yu Leng <yuleng@microsoft.com>
yeelam-gordon pushed a commit that referenced this pull request Jan 31, 2026
Enhanced SanitizeAndNormalize to handle Unicode normalization more
robustly, ensuring correct buffer sizing and error handling. Added unit
tests for regex metacharacters `$` and `^` to verify correct replacement
behavior at string boundaries. Improves Unicode support and test
coverage for regex edge cases.

<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #44942 #44892
<!-- - [ ] Closes: #yyy (add separate lines for additional resolved
issues) -->
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

---------

Co-authored-by: Yu Leng <yuleng@microsoft.com>
@vanzue vanzue added this to the PowerToys 0.97 milestone Feb 9, 2026
@vanzue vanzue added the Product-PowerRename Refers to the PowerRename PowerToy label Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

In for .97 Product-PowerRename Refers to the PowerRename PowerToy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Powerrename regex $ not working

6 participants