[PR #12586] [MERGED] Fix RTF generation for Unicode characters #29123

Open
opened 2026-01-31 09:32:57 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/12586
Author: @ianjoneill
Created: 2/26/2022
Status: Merged
Merged: 3/1/2022
Merged by: @undefined

Base: mainHead: f-fix-rtf-unicode


📝 Commits (4)

  • d3d8f72 Fix RTF generation for Unicode characters
  • ffd1a2a Static analysis fix
  • 7977858 Address review comment
  • 4589c50 Properly address review comment

📊 Changes

3 files changed (+62 additions, -14 deletions)

View changed files

📝 src/buffer/out/textBuffer.cpp (+27 -14)
📝 src/buffer/out/textBuffer.hpp (+2 -0)
📝 src/host/ut_host/TextBufferTests.cpp (+33 -0)

📄 Description

Summary of the Pull Request

Fixes RTF generation for text with Unicode characters.

PR Checklist

  • Closes [System.Console]::SetWindowPosition() fails to set cursor position (#12379)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated.
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Validation Steps Performed

Added some unit tests.

Ran the following in PowerShell and copied the emitted text into WordPad.

echo "This is some Ascii \ {}`nLow code units: á é í ó ú `u{2b81} `u{2b82}`nHigh code units: `u{a7b5} `u{a7b7}`nSurrogates: `u{1f366} `u{1f47e} `u{1f440}"

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/12586 **Author:** [@ianjoneill](https://github.com/ianjoneill) **Created:** 2/26/2022 **Status:** ✅ Merged **Merged:** 3/1/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `f-fix-rtf-unicode` --- ### 📝 Commits (4) - [`d3d8f72`](https://github.com/microsoft/terminal/commit/d3d8f72bc12afdbc6cce8e59b710ce4f52b340b5) Fix RTF generation for Unicode characters - [`ffd1a2a`](https://github.com/microsoft/terminal/commit/ffd1a2aef9d049fbfa3801294ae3fae5d4faf896) Static analysis fix - [`7977858`](https://github.com/microsoft/terminal/commit/7977858f33dc0d790790690b9a53468823f564b9) Address review comment - [`4589c50`](https://github.com/microsoft/terminal/commit/4589c500b49a7fe09a2f69808370baa5b0e5603e) Properly address review comment ### 📊 Changes **3 files changed** (+62 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `src/buffer/out/textBuffer.cpp` (+27 -14) 📝 `src/buffer/out/textBuffer.hpp` (+2 -0) 📝 `src/host/ut_host/TextBufferTests.cpp` (+33 -0) </details> ### 📄 Description ## Summary of the Pull Request Fixes RTF generation for text with Unicode characters. ## PR Checklist * [x] Closes #12379 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Validation Steps Performed Added some unit tests. Ran the following in PowerShell and copied the emitted text into WordPad. ```pwsh echo "This is some Ascii \ {}`nLow code units: á é í ó ú `u{2b81} `u{2b82}`nHigh code units: `u{a7b5} `u{a7b7}`nSurrogates: `u{1f366} `u{1f47e} `u{1f440}" ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:32:57 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#29123