[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Misalignment of Double-Width Characters with Dialog Utility's --column-s
From: |
sunnycemetery |
Subject: |
Misalignment of Double-Width Characters with Dialog Utility's --column-separator Option |
Date: |
Thu, 17 Jan 2019 20:11:38 -0500 |
User-agent: |
Mutt/1.11.1 (2018-12-01) |
Here is a simple test:
dialog --column-separator '|' --radiolist 'DOUBLE-WIDTH ALIGNMENT TEST' 0 0 0 g
'Great|Grits' 0 j 'Jolly|Juice' 0 m 'マーベラスな|味噌汁' 0
Here is the output:
┌─────────────────────────────────────────┐
│ DOUBLE-WIDTH ALIGNMENT TEST │
│ ┌─────────────────────────────────────┐ │
│ │ ( ) g Great Grits │ │
│ │ ( ) j Jolly Juice │ │
│ │ ( ) m マーベラスな 味噌汁 │ │
│ └─────────────────────────────────────┘ │
│ │
│ │
├─────────────────────────────────────────┤
│ < 了解 > < 取消 > │
└─────────────────────────────────────────┘
And here is the expected output:
┌─────────────────────────────────────────┐
│ DOUBLE-WIDTH ALIGNMENT TEST │
│ ┌─────────────────────────────────────┐ │
│ │ ( ) g Great Grits │ │
│ │ ( ) j Jolly Juice │ │
│ │ ( ) m マーベラスな 味噌汁 │ │
│ └─────────────────────────────────────┘ │
│ │
│ │
├─────────────────────────────────────────┤
│ < 了解 > < 取消 > │
└─────────────────────────────────────────┘
(Hopefully your MUA uses a monospaced font.)
I am using dialog 1.3-20181107. Interestingly, alignment of the tag/item
columns *does* seem to account for double-width characters:
dialog --radiolist 'DOUBLE-WIDTH ALIGNMENT TEST' 0 0 0 g 'Great Grits' 0 j
'Jolly Juice' 0 マ 'マーベラスな味噌汁' 0
Output:
┌────────────────────────────────┐
│ DOUBLE-WIDTH ALIGNMENT TEST │
│ ┌────────────────────────────┐ │
│ │ ( ) g Great Grits │ │
│ │ ( ) j Jolly Juice │ │
│ │ ( ) マ マーベラスな味噌汁 │ │
│ └────────────────────────────┘ │
│ │
│ │
├────────────────────────────────┤
│ < 了解 > < 取消 > │
└────────────────────────────────┘
Proper alignment of double-width characters is also demonstrated in the
following snazzy screenshot:
https://invisible-island.net/dialog/dialog.html#screenshot
So is this a bug? Thank you for reading.
- Misalignment of Double-Width Characters with Dialog Utility's --column-separator Option,
sunnycemetery <=