summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorCraig Small <csmall@dropbear.xyz>2022-02-01 16:46:09 +1100
committerCraig Small <csmall@dropbear.xyz>2022-02-01 16:46:09 +1100
commite5542f1fc33e61f594876039c9eed24a92a2597d (patch)
treeb683d2f43c319f5c623d6fb4fe713c2049fd09db /NEWS
parent9f4db0fb5606e4872829bd44b29443d5707b1505 (diff)
downloadprocps-ng-e5542f1fc33e61f594876039c9eed24a92a2597d.tar.gz
free: Use wstr width and not length
The previous commit used the value from mbstowcs() to work out the spacing required, as printf() got it completely wrong. However, for alignment of text you don't use the string length but the string width. As the referenced website says: Use wcslen when allocating memory for wide characters, and use wcswidth to align text. Which is what free does now. Chinese is still off by one but I cannot see why this is so. It's close enough for now. If someone can work it out, I'd love to know what the fix is. As a side effect, #213 is fixed because we are putting the correct number of spaces in. French is still an issue (see #24 ) but this is because the string is too long! References: procps-ng/procps#24 procps-ng/procps#213 procps-ng/procps#229 commit 9f4db0fb5606e4872829bd44b29443d5707b1505 https://www.linux.com/news/programming-wide-characters/ Signed-off-by: Craig Small <csmall@dropbear.xyz>
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS1
1 files changed, 1 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index d8417d3..a487278 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ procps-ng-NEXT
* free: Add committed line option merge #25
* free: Fix -h --si combined options issue #133, #223
* free: Fix first column justification issue #229, #204, #206, Debian #1001689
+ * free: Better spacing for Chinese language issue #213
* library: renamed to libproc-2 and reset to 0:0:0
* library: add support for accessing smaps_rollup issue #112, #201
* library: add support for accessing autogroups