Subject: problems with 8-bit characters (such as German umlauts)

From: "Mike A. Harris" <[email-masked]>
Date: Thu, 8 Aug 2002 04:14:08 -0400 (EDT)

PINE 4.44 (and possibly older versions) seems to have problems 
with German umlauts being used.  The full bug details are 
available in Red Hat bugzilla at:

http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=70518

Is anyone aware of a bugfix for this problem?

-- 
Mike A. Harris                  Shipping/mailing address:
OS Systems Engineer             190 Pittsburgh Ave., Sault Ste. Marie,
XFree86 maintainer              Ontario, Canada, P6C 5B3
Red Hat Inc.
http://www.redhat.com           ftp://people.redhat.com/mharris

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: Jeff Franklin <[email-masked]>
Date: Mon, 19 Aug 2002 14:52:08 -0700 (PDT)

> Is anyone aware of a bugfix for this problem?

Hi Mike,

I can reproduce this with pine4.44 on RedHat 7.3, but it seems to me that
the problem is most likely with glibc, and in particular sprintf.

In mailindx.c, line 3791 (pine4.44), there is the following line:
sprintf(p, "%-*.*s", width, width, cdesc->string);
which, in the person's example email, works out to be something like this:
sprintf(p, "%-*.*s", 18, 18, "J\366rg Linn...");

When setting the system font to the same one as in the person's
environment, sprintf returns -1 with an empty string for p (the man page
doesn't say anything about a return value of -1 for sprintf).  It works in
my default environment, and it is the presence of the \366 char that
causes it to return -1.

Trying various combinations in gdb, it seems like the bug has to do with
the ".*" (precision) part.

I tried using what appears to be the latest glibc rpm :
glibc-kernheaders-2.4-7.14
glibc-2.2.5-39
glibc-devel-2.2.5-39
glibc-common-2.2.5-39

... And the problem still exists.

Let me know if you need any other information.

Jeff

-- 
Jeff Franklin <[email-masked]>
Networks and Distributed Computing    University of Washington