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

Broken layout with unicode #811

Closed
Kogia-sima opened this issue Jan 26, 2020 · 2 comments
Closed

Broken layout with unicode #811

Kogia-sima opened this issue Jan 26, 2020 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@Kogia-sima
Copy link
Contributor

🐛 Bug Report

Description

File that contains unicode characters breaks the output layout.

It seems that bat regards the all input characters as single-width letter. However, if some line contains multiple-width character, the number of characters and the true width of line is different. That makes the bat split the line string at wrong position.

Example

0126_1036

Possible Solution

Maybe unicode-width crate could solve this problem.

Environment

Software Version
bat 0.12.1
qterminal 0.14.1
OS Lubuntu 19.10 Eoan Ermine
@sharkdp sharkdp added the duplicate This issue or pull request already exists label Jan 26, 2020
@sharkdp
Copy link
Owner

sharkdp commented Jan 26, 2020

This is a duplicate of #787

@sharkdp sharkdp closed this as completed Jan 26, 2020
Kogia-sima added a commit to Kogia-sima/bat that referenced this issue Feb 1, 2020
sharkdp pushed a commit that referenced this issue Feb 28, 2020
@sharkdp
Copy link
Owner

sharkdp commented Mar 22, 2020

This has been fixed in bat 0.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants