[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gcal] Display length of non-ASCII
From: |
Göran Uddeborg |
Subject: |
Re: [Bug-gcal] Display length of non-ASCII |
Date: |
Sun, 12 Jun 2016 21:32:35 +0200 |
Mariusz Adamski:
> Well, actually 6 years ago I was mainly interested with fixing alignment
> in gcal and gcal -i and a simple replacement of sprintf and strlen with
> their unicode equivalents seemed to do the trick, so that is what
> --enable-unicode effectively does.
Aha, so the code in src/common.h is all there is to it! I tried it
(first installing libunistring-devel) and it does indeed fix most of
the problems! That was easier than I thought.
And I now understand why it is called "enable-unicode"; these
functions are indeed documented to be Unicode specific.
> Unfortunately, the holidays code
> makes a lot of assumptions with stuff like *(*result_txt + len) = '\0',
> when len is a number of characters, not bytes. It needs a serious
> rethinking, in my opinion.
Right, I still see broken names of days in the --holiday-list output.
But the alignment got better there too, so it was still an
improvement! :-)