[git commit master] cal: document the location of unicode bug. no code changes

Denys Vlasenko vda.linux at googlemail.com
Wed Jan 6 09:18:37 UTC 2010


commit: http://git.busybox.net/busybox/commit/?id=86350f8d5f5d5a1006cffe0bedccd625f012702f
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 coreutils/cal.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/coreutils/cal.c b/coreutils/cal.c
index 1f498fb..8236442 100644
--- a/coreutils/cal.c
+++ b/coreutils/cal.c
@@ -115,11 +115,17 @@ int cal_main(int argc UNUSED_PARAM, char **argv)
 	i = 0;
 	do {
 		zero_tm.tm_mon = i;
+		/* full month name according to locale */
 		strftime(buf, sizeof(buf), "%B", &zero_tm);
 		month_names[i] = xstrdup(buf);
 
 		if (i < 7) {
 			zero_tm.tm_wday = i;
+//FIXME: unicode
+//Bug 839:
+//testcase with doublewidth Japanese chars: "LANG=zh_TW.utf8 cal"
+//perhaps use wc[s]width() to probe terminal width
+			/* abbreviated weekday name according to locale */
 			strftime(buf, sizeof(buf), "%a", &zero_tm);
 			strncpy(day_headings + i * (3+julian) + julian, buf, 2);
 		}
-- 
1.6.3.3



More information about the busybox-cvs mailing list