Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Don't escape unicode chars in the otput #1477

Closed
eugenesvk opened this issue Jul 19, 2023 · 4 comments
Closed

🚀 Don't escape unicode chars in the otput #1477

eugenesvk opened this issue Jul 19, 2023 · 4 comments

Comments

@eugenesvk
Copy link

When using some special chars in file names I get escaped ugliness in the output

delta '~/Dev/1/file—2.txt' '~/Dev/1/file—1.txt'

~/Dev/1/file\342\200\2242.txt ⟶   ~/Dev/1/file\342\200\2241.txt

Is it possible to just leave the symbols as is?
Sorry if I've missed some config, tried searching 'unicode' and 'escape' in the help files

@Freed-Wu
Copy link

Similar problem for other unicode characters. The above is git diff, the below is delta:

Screenshot from 2023-11-11 01-52-17

@Freed-Wu
Copy link

Even the mid line cannot be aligned.

Screenshot from 2023-11-11 01-54-02

@opennomad
Copy link

I did some more digging and since the docs mention highlighting is based on bat, I took a look there and found issue 2578, which looks similar.

The recommendations there worked for me. I first tested the same file with bat and also saw the <U+....>. Disabling the paging showed the correct symbol, which points to less as the culprit.

So I set export LESSUTFCHARDEF=E000-F8FF:p,F0000-FFFFD:p,100000-10FFFD:p and both bat and delta started showing the symbols.

@th1000s
Copy link
Collaborator

th1000s commented Sep 9, 2024

That is git which escapes the paths, the related move is fixed in #1840. To not quote it set

[core]
     quotepath = false

The (unrelated) LESSUTFCHARDEF issue with newer less versions is fixed in 0.18.0 see this comment on #1616 for more.

@th1000s th1000s closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants