Links/URLs get offset when certain unicode characters are printed #11971

Closed
opened 2026-01-31 03:02:49 +00:00 by claunia · 13 comments
Owner

Originally created by @Entrivax on GitHub (Jan 5, 2021).

Originally assigned to: @DHowett on GitHub.

Environment

Windows build number: Windows 10 version 2004 (10.0.19041.0)
Windows Terminal version: Preview 1.5.3242.0

Steps to reproduce

Print certain unicode characters like this one: 𝓐

Expected behavior

Links/URLs should be valid.

Actual behavior

Links/URLs get offset and break with the presence of certain unicode characters.
For example, if the following text is printed:

𝓐𝓐𝓐
https://microsoft.com/

image

The hoverable link, clickable link and opened link is ps://microsoft.com/
If those unicode characters are not printed (if you scroll for example), the links work again.

https://user-images.githubusercontent.com/1197915/103703479-e54b9280-4fa7-11eb-9394-4d6bd81e952d.mp4

Note that the emoji doesn't cause the issue.
The code used in the video is:

console.log(`𝓐𝓐𝓐𝓐𝓐𝓐 123 https://microsoft.com/

✨ https://google.com/
https://google.fr/
https://youtube.com/
https://aka.ms/`)
Originally created by @Entrivax on GitHub (Jan 5, 2021). Originally assigned to: @DHowett on GitHub. # Environment ```none Windows build number: Windows 10 version 2004 (10.0.19041.0) Windows Terminal version: Preview 1.5.3242.0 ``` # Steps to reproduce Print certain unicode characters like this one: `𝓐` # Expected behavior Links/URLs should be valid. # Actual behavior Links/URLs get offset and break with the presence of certain unicode characters. For example, if the following text is printed: ```none 𝓐𝓐𝓐 https://microsoft.com/ ``` ![image](https://user-images.githubusercontent.com/1197915/103703785-77ec3180-4fa8-11eb-888f-536ac6a8271c.png) The hoverable link, clickable link and opened link is `ps://microsoft.com/ ` If those unicode characters are not printed (if you scroll for example), the links work again. https://user-images.githubusercontent.com/1197915/103703479-e54b9280-4fa7-11eb-9394-4d6bd81e952d.mp4 Note that the emoji doesn't cause the issue. The code used in the video is: ```js console.log(`𝓐𝓐𝓐𝓐𝓐𝓐 123 https://microsoft.com/ ✨ https://google.com/ https://google.fr/ https://youtube.com/ https://aka.ms/`) ```
Author
Owner

@zadjii-msft commented on GitHub (Jan 6, 2021):

Oh weird. I would have thought this was a dupe of #8121, but that one was fixed in 1.5.3142, so this must be it's own variation on the subject.

Those 𝓐 characters are really messing it up, huh.

@zadjii-msft commented on GitHub (Jan 6, 2021): Oh weird. I would have thought this was a dupe of #8121, but that one was fixed in 1.5.3142, so this must be it's own variation on the subject. Those 𝓐 characters are really messing it up, huh.
Author
Owner

@Entrivax commented on GitHub (Jan 6, 2021):

It looks a lot like it, going the other way from the screen of that issue.

Those 𝓐 characters are really messing it up, huh.

Yeah, I found the problem when printing display usernames from an api. Not only the 𝓐 character, but also the rest of the alphabet written like that. Maybe there is more characters than that, I didn't try to find them all.

@Entrivax commented on GitHub (Jan 6, 2021): It looks a lot like it, going the other way from the screen of that issue. > Those 𝓐 characters are really messing it up, huh. Yeah, I found the problem when printing display usernames from an api. Not only the `𝓐` character, but also the rest of the alphabet written like that. Maybe there is more characters than that, I didn't try to find them all.
Author
Owner

@skyline75489 commented on GitHub (Jan 9, 2021):

The 𝓐 is considered as two wide chars because of #8124. Another place we might want to use a comprehensive Unicode width estimator .

@skyline75489 commented on GitHub (Jan 9, 2021): The 𝓐 is considered as two wide chars because of #8124. Another place we might want to use a comprehensive Unicode width estimator .
Author
Owner

@zed76r commented on GitHub (May 10, 2021):

image

image

@zed76r commented on GitHub (May 10, 2021): ![image](https://user-images.githubusercontent.com/7886856/117627966-39ab8c80-b1ab-11eb-9d8f-ed37eb510958.png) ![image](https://user-images.githubusercontent.com/7886856/117628250-84c59f80-b1ab-11eb-8d0e-c8abacaa4030.png)
Author
Owner

@mas90 commented on GitHub (Jul 22, 2021):

Yeah, I found the problem when printing display usernames from an api. Not only the 𝓐 character, but also the rest of the alphabet written like that. Maybe there is more characters than that, I didn't try to find them all.

Definitely more characters than that, e.g. 🎟.

echo -e '\xf0\x9f\x8e\x9f http://www.example.com/' reproduces the bug on version 1.9.1445.0.

@mas90 commented on GitHub (Jul 22, 2021): > Yeah, I found the problem when printing display usernames from an api. Not only the `𝓐` character, but also the rest of the alphabet written like that. Maybe there is more characters than that, I didn't try to find them all. Definitely more characters than that, e.g. 🎟. `echo -e '\xf0\x9f\x8e\x9f http://www.example.com/'` reproduces the bug on version 1.9.1445.0.
Author
Owner

@DHowett commented on GitHub (Dec 14, 2021):

Clever quick fix -- thanks @Comzyh! I'm rolling this into the 1.11 and 1.12 servicing releases we're putting out to make Terminal more robust over the holidays. :)

@DHowett commented on GitHub (Dec 14, 2021): Clever quick fix -- thanks @Comzyh! I'm rolling this into the 1.11 and 1.12 servicing releases we're putting out to make Terminal more robust over the holidays. :)
Author
Owner

@ghost commented on GitHub (Dec 14, 2021):

:tada:This issue was addressed in #11915, which has now been successfully released as Windows Terminal Preview v1.12.3472.0.🎉

Handy links:

@ghost commented on GitHub (Dec 14, 2021): :tada:This issue was addressed in #11915, which has now been successfully released as `Windows Terminal Preview v1.12.3472.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.12.3472.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@ghost commented on GitHub (Dec 14, 2021):

:tada:This issue was addressed in #11915, which has now been successfully released as Windows Terminal v1.11.3471.0.🎉

Handy links:

@ghost commented on GitHub (Dec 14, 2021): :tada:This issue was addressed in #11915, which has now been successfully released as `Windows Terminal v1.11.3471.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.11.3471.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@CerebralDatabank commented on GitHub (Mar 28, 2024):

I'm still having this issue with 5-digit Nerd Font Unicode characters on Windows 11…

image

@CerebralDatabank commented on GitHub (Mar 28, 2024): I'm still having this issue with 5-digit Nerd Font Unicode characters on Windows 11… ![image](https://github.com/microsoft/terminal/assets/24465111/07adc65c-e3b8-4f06-ad58-80120f0a2662)
Author
Owner

@DHowett commented on GitHub (Mar 28, 2024):

Which version of Terminal are you using? This issue was closed two years ago 🙂

@DHowett commented on GitHub (Mar 28, 2024): Which version of Terminal are you using? This issue was closed two years ago 🙂
Author
Owner

@j4james commented on GitHub (Mar 28, 2024):

@DHowett I think this regressed recently, because I was able to reproduce the issue until I got the update from 3 days ago. I'm assuming it was fixed by this:

Auto-detected URLs and search results are no longer pushed around by wide characters (oops) (https://github.com/microsoft/terminal/pull/16787)

@CerebralDatabank Bottom line is you probably just need to get the very latest update.

@j4james commented on GitHub (Mar 28, 2024): @DHowett I think this regressed recently, because I was able to reproduce the issue until I got the update from 3 days ago. I'm assuming it was fixed by this: > Auto-detected URLs and search results are no longer pushed around by wide characters (oops) (https://github.com/microsoft/terminal/pull/16787) @CerebralDatabank Bottom line is you probably just need to get the very latest update.
Author
Owner

@CerebralDatabank commented on GitHub (Mar 28, 2024):

@DHowett Haha I knew that, but what can I say, I still have the issue 😅 thought replying here was better than opening a duplicate lol

@j4james I think you're right, latest stable is v1.19.10821.0 and I have v1.19.10573.0. But nothing happens when I check for updates in Terminal and there's no "Update" in the Store page.

If I install the latest release via the .msixbundle from here, will that mess up the existing link with MS Store updates? Or should I just wait until it rolls out to my device?

@CerebralDatabank commented on GitHub (Mar 28, 2024): @DHowett Haha I knew that, but what can I say, I still have the issue 😅 thought replying here was better than opening a duplicate lol @j4james I think you're right, latest stable is `v1.19.10821.0` and I have `v1.19.10573.0`. But nothing happens when I check for updates in Terminal and there's no "Update" in the Store page. If I install the latest release via the `.msixbundle` from here, will that mess up the existing link with MS Store updates? Or should I just wait until it rolls out to my device?
Author
Owner

@DHowett commented on GitHub (Mar 28, 2024):

thought replying here was better

you know what, that's totally fair! hah!

will that mess up the ... link

Nope, you can install the msixbundle from here and it will still hook up to the store for future updates!

@DHowett commented on GitHub (Mar 28, 2024): > thought replying here was better you know what, that's totally fair! hah! > will that mess up the ... link Nope, you can install the `msixbundle` from here and it will still hook up to the store for future updates!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11971