jjcarrier / PS-TableUI

A simple PowerShell UI for working with selections of objects
MIT License
9 stars 1 forks source link

Fix issue with pager rendering #25

Closed jjcarrier closed 2 weeks ago

jjcarrier commented 2 months ago

Some packages (i.e. Elgato.StreamDeck) use special UTF8 characters in the package information. The pager has been observed to improperly handle this text and causes jittery output. It is believed this may be due to multibyte characters and the way the pager determines how to wrap/paginate the data.

jjcarrier commented 2 months ago

This character appears to be problematic (maybe others): ✅

These did not appear to cause problems: 🆕🛞🔊🔌

jjcarrier commented 2 weeks ago

The issue likely is due the difference shown below:

'✅'.Length
1
'✅' | Format-Hex

   Label: String (System.String) <68C61576>

          Offset Bytes                                           Ascii
                 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
          ------ ----------------------------------------------- -----
0000000000000000 E2 9C 85                                        �

Versus all other characters mentioned above are similar to the below:

'🆕'.Length
2
'🆕' | Format-Hex

   Label: String (System.String) <0E48DA1F>

          Offset Bytes                                           Ascii
                 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
          ------ ----------------------------------------------- -----
0000000000000000 F0 9F 86 95                                     �

However, this issue is not related to this repo. It should be moved to: https://github.com/jjcarrier/PS-WinGet-Essentials