Skip to content

Fix work package list alignment with accented characters#10

Merged
cbliard merged 1 commit intomainfrom
fix/alignment-with-accentuated-letters
Apr 20, 2026
Merged

Fix work package list alignment with accented characters#10
cbliard merged 1 commit intomainfrom
fix/alignment-with-accentuated-letters

Conversation

@cbliard
Copy link
Copy Markdown
Member

@cbliard cbliard commented Apr 20, 2026

Use utf8.RuneCountInString instead of len() to compute column widths, so that accented characters (é, â, à...) are counted as 1 display character instead of 2 bytes.

Add a regression test that catches the misalignment.

Use utf8.RuneCountInString instead of len() to compute column widths,
so that accented characters (é, â, à...) are counted as 1 display
character instead of 2 bytes.

Add a regression test that catches the misalignment.
@cbliard cbliard requested a review from Kharonus April 20, 2026 09:59
Copy link
Copy Markdown
Member

@Kharonus Kharonus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impressive find. I wasn't at all aware of that behaviour of len. Thanks for adding a test case, too.

@cbliard
Copy link
Copy Markdown
Member Author

cbliard commented Apr 20, 2026

Well, I was lucky I had some accented letters in the wp I listed, and then the rest is obvious.

@cbliard cbliard merged commit 95d604e into main Apr 20, 2026
4 checks passed
@cbliard cbliard deleted the fix/alignment-with-accentuated-letters branch April 20, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants