Debian Bug report logs -
#174527
tin: broken multi-byte character set entries
Reported by: "Chuan-kai Lin" <b86506063@ntu.edu.tw>
Date: Sat, 28 Dec 2002 08:19:10 UTC
Severity: normal
Tags: upstream
Found in version 1:1.5.14+20020917-1
Fixed in versions 1.7.6, 1:1.7.6+20040707-1
Done: Marco d'Itri <md@linux.it>
Bug is archived. No further changes may be made.
Forwarded to tin-dev@tin.org
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Marco d'Itri <md@linux.it>, tin@packages.qa.debian.org:
Bug#174527; Package tin.
(full text, mbox, link).
Acknowledgement sent to "Chuan-kai Lin" <b86506063@ntu.edu.tw>:
New Bug report received and forwarded. Copy sent to Marco d'Itri <md@linux.it>, tin@packages.qa.debian.org.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: tin
Version: 1:1.5.14+20020917-1
Severity: normal
Well, this bug has been observed in tin for quite a long time.
The problem goes like this: whenever tin prompts you to enter some
information in the bottom of the terminal (like, when you want to
conduct a search), entering multi-byte characters (Big5 in my case)
always result in garbage, regardless of locale settings.
Why does the problem exist? All input characters are filtered through
the my_isprint function in misc.c, which in turn invokes the isprint
function in the C library. Normally this should not be a problem,
because the isprint function in the C library is now locale aware --
but the catch is that it works for single-byte character sets only.
You see, isprint process one byte at a time, and any single byte in a
multi-byte character set is naturally not printable.
There are, in my opinion, two ways to solve this problem: the easy
way and the right way. The easy way is to make special cases for all
multi-byte characters so that my_isprint always returns true (as
currently done when NO_LOCALE is defined at compile time). The right
way is to convert the entire program to make use of wide characters
(wchar_t and wint_t) and replace isprint to iswprint.
I think this one should be forwarded to upstream.
-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux debian 2.4.19 #3 SMP Fri Nov 22 01:13:13 CST 2002 i686
Locale: LANG=C, LC_CTYPE=zh_TW.Big5
Versions of packages tin depends on:
ii debconf 1.2.20 Debian configuration management sy
ii libc6 2.2.5-14.3 GNU C Library: Shared libraries an
ii libncurses5 5.2.20020112a-8 Shared libraries for terminal hand
ii libpcre3 3.4-1.1 Philip Hazel's Perl Compatible Reg
Information forwarded to debian-bugs-dist@lists.debian.org, Marco d'Itri <md@linux.it>, tin@packages.qa.debian.org:
Bug#174527; Package tin.
(full text, mbox, link).
Acknowledgement sent to Andreas Metzler <ametzler@downhill.at.eu.org>:
Extra info received and forwarded to list. Copy sent to Marco d'Itri <md@linux.it>, tin@packages.qa.debian.org.
(full text, mbox, link).
Message #10 received at 174527@bugs.debian.org (full text, mbox, reply):
Chuan-kai Lin schrieb:
[...]
> The problem goes like this: whenever tin prompts you to enter some
> information in the bottom of the terminal (like, when you want to
> conduct a search), entering multi-byte characters (Big5 in my case)
> always result in garbage, regardless of locale settings.
[...]
> There are, in my opinion, two ways to solve this problem: the easy
> way and the right way. The easy way is to make special cases for all
> multi-byte characters so that my_isprint always returns true (as
> currently done when NO_LOCALE is defined at compile time). The right
> way is to convert the entire program to make use of wide characters
> (wchar_t and wint_t) and replace isprint to iswprint.
> I think this one should be forwarded to upstream.
Just FYI: This problem is known and conversion to wchar (and ncursesw)
has aleady been started some months ago.
IIRC just two weeks ago somebody attacked the problem you discussed,
that it is impossible to enter no multi-byte chatacters. (I am sorry I
cannot give him him credit, I haven't got my mails with me and can't
look it up.
thanks, cu andreas
Noted your statement that Bug has been forwarded to tin-dev@tin.org.
Request was from md@Linux.IT (Marco d'Itri)
to control@bugs.debian.org.
(full text, mbox, link).
Tags added: upstream
Request was from Marco d'Itri <md@Linux.IT>
to control@bugs.debian.org.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Marco d'Itri <md@linux.it>:
Bug#174527; Package tin.
(full text, mbox, link).
Acknowledgement sent to Marco d'Itri <md@Linux.IT>:
Extra info received and forwarded to list. Copy sent to Marco d'Itri <md@linux.it>.
(full text, mbox, link).
Message #19 received at 174527@bugs.debian.org (full text, mbox, reply):
I uploaded a new tin package which should fix this bug.
Please let me know how it works.
--
ciao, |
Marco | [1536 unyrq0dSfrvwQ]
Information forwarded to debian-bugs-dist@lists.debian.org, Marco d'Itri <md@linux.it>:
Bug#174527; Package tin.
(full text, mbox, link).
Acknowledgement sent to Chuan-kai Lin <b86506063@ntu.edu.tw>:
Extra info received and forwarded to list. Copy sent to Marco d'Itri <md@linux.it>.
(full text, mbox, link).
Message #24 received at 174527@bugs.debian.org (full text, mbox, reply):
On Sun, Jun 15, 2003 at 11:19:39PM +0200, Marco d'Itri wrote:
> I uploaded a new tin package which should fix this bug.
> Please let me know how it works.
I have installed the 1:1.5.19+20030609-1 package. The getline function
now indeed makes good use of wide character support in the C library as
well as ncurses, but there are still some problems:
1. When entering wide characters (Big5 Chinese with LC_CTYPE=zh_TW.Big5
in my case), the cursor always advances one character too many.
Since the gl_fixup function in getline.c keeps track of cursor
positions through its own internal model and without actually
checking through ncurses to see if the cursor is indeed where it is
supposed to be, the whole text entry area tend to turn into garbage
after a few text manipulation or cursor movement commands. I
believe that this is caused by a bug in the ncurses library itself,
and I have written to the ncurses developers for clarifications.
2. It appears that tin_getline and friends still does not clearly
differentiate between the length of string measured as the number of
(wide) characters in it, and the length of string measured as the
number of ASCII character cells it would occupy when displayed on
the terminal. In the ASCII-only and multibyte character cases, both
of these would be the same, but when wide characters are used, they
need not have any trivial relationships: a wide character can take
up one or two ASCII character cells on the terminal. This should be
looked into and fixed as well.
3. When fixing problem 2, please make sure that cursor movement are
wide-character aware as well, eg. the left arrow key should move the
cursor across exactly one character regardless of the displayed
width of the character.
Perhaps it is a good idea to make use of GNU readline for text entry.
AFAIK it supports all the current features offered by tin_getline, works
with wide characters quite gracefully, and is free from the bugs
described above. Having one less module to maintain should also be
beneficial from the developer's point of view. (I guess you will help me
forward this message upstream?)
Please contact me if you need any more information.
Regards,
--
Chuan-kai Lin
http://www.csie.ntu.edu.tw/~b6506063/
Information forwarded to debian-bugs-dist@lists.debian.org, Marco d'Itri <md@linux.it>:
Bug#174527; Package tin.
(full text, mbox, link).
Acknowledgement sent to Urs Janßen <urs@tin.org>:
Extra info received and forwarded to list. Copy sent to Marco d'Itri <md@linux.it>.
(full text, mbox, link).
Message #29 received at 174527@bugs.debian.org (full text, mbox, reply):
the multibyte problems in getline.c should have been fixed in
tin >= 1.7.6
urs
--
"Only whimps use tape backup: _real_ men just upload their important stuff
on ftp, and let the rest of the world mirror it ;)" - Linus
Bug marked as fixed in version 1.7.6, send any further explanations to "Chuan-kai Lin" <b86506063@ntu.edu.tw>
Request was from Marco d'Itri <md@linux.it>
to control@bugs.debian.org.
(full text, mbox, link).
Marked as fixed in versions 1:1.7.6+20040707-1.
Request was from Andreas Beckmann <anbe@debian.org>
to control@bugs.debian.org.
(Fri, 01 Nov 2013 01:21:38 GMT) (full text, mbox, link).
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Fri, 29 Nov 2013 07:31:25 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Mon Nov 6 20:54:47 2017;
Machine Name:
beach
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.