gum icon indicating copy to clipboard operation
gum copied to clipboard

Double encoding in Powershell

Open korpa opened this issue 1 year ago • 6 comments

Describe the bug While this works fine in Linux: image

Powershell doesn't like it when we forward the result of gum format to gum style image

To Reproduce In Powershell:

  • First run echo "* List" | gum format. Markdown is rendered correctly.
  • Then run gum style --foreground "#FFF" --border-foreground "2" --border double --align left --width 100 --margin "1 2" --padding "1 1" "$(echo "* List" | gum format )". The dot of the list transforms to wired chars.

Expected behavior Powershell behaves like Bash

korpa avatar Oct 31 '23 13:10 korpa

piping gum format to gum style works fine

echo "* List" | gum format | gum style --foreground "#FFF" --border-foreground "2" --border double --align left --width 100 --margin "1 2" --padding "1 1"

image

kirides avatar Apr 30 '24 19:04 kirides

For me it doesn't:

image

korpa avatar May 06 '24 13:05 korpa

What Powershell are you using? image

Did you override the default encodings? image

kirides avatar May 07 '24 10:05 kirides

image

korpa avatar Jun 17 '24 14:06 korpa

@korpa you're using the old an dated "Powershell" (blue logo) and not the more modern and maintained "Powershell Core" (black logo)

You can install the newer powershell using winget by doing winget install Microsoft.PowerShell

kirides avatar Jun 19 '24 15:06 kirides

Hej @kirides,

I installed the latest Powershell as suggested by you, but still have the same issue:

image

I tested a couple of scenarios:

  • Terminals: Windows Terminal, Alacritty
  • Fonts: JetBrainsMono Nerdfont, Cascadia Mono

In all scenarios the same issue.

korpa avatar Jun 24 '24 07:06 korpa