Is this a pbcopy
command garbled bug?
If so, is there a way to fix it?
I've tried a few ways but still can't found why this is happened.
update
open it in the terminal is ok, but garbled when open it in a file editor(vscode)
# ✅ terminal
$ cat man-grep.md
# ❌ vscode
$ code -n man-grep.md
vscode toggle UTF-8
/UTF-16
both not work at all?
screenshot gif
https://cdn.xgqfrms.xyz/Linux/unicode-garbled-bug.gif
error / bug
Steps to reproduce
# 1. copy output
$ man grep | pbcopy
# 2. paste to a markdown file
# 3. view the markdown file
using vscode
open the markdown
file, still garbled
template solutions
- output to a markdown file
# stdout
$ man ls > man-ls.md
# $ man grep > man-grep.md
# no pagination problem ✅
$ cat man-ls.md
# $ cat man-grep.md
- manually copy & paste (page by page )
# copy man docs, page by page
$ man grep