RPM Community Forums

Mailing List Message of <popt-devel>

Re: Some umlaut issues in popt 1.15 (the old thing again)

From: Jeff Johnson <n3npq@mac.com>
Date: Mon 26 May 2008 - 00:34:52 CEST
Message-id: <D553316F-198D-44C8-B98B-15EA7E317AAD@mac.com>

On May 25, 2008, at 9:19 AM, Robert Scheck wrote:

> Hello all,
> I've claimed that I can see some umlaut issues with popt 1.14 and I  
> really
> would like to see it solved, now. Reproducer is for me as follows.  
> Using
> popt-1.13-3 from Fedora 8, 9 or Rawhide, I simply executed the  
> following:
> $ LANG=de_DE@euro rpm --help > rpm-1.13-iso
> $ LANG=de_DE.UTF-8 rpm --help > rpm-1.13-utf
> Using popt 1.15 from latest CVS checkout, I also did the following:
> $ LANG=de_DE@euro rpm --help > rpm-1.15-iso
> $ LANG=de_DE.UTF-8 rpm --help > rpm-1.15-utf
> Results are now as follows using file(1) to compare:
> popt-1.13-iso: ISO-8859 text					# as expected
> popt-1.13-utf: UTF-8 Unicode text				# as expected
> popt-1.15-iso: Non-ISO extended-ASCII text		# NOT as expected
> popt-1.15-utf: UTF-8 Unicode text				# as expected

Hmmm, file(1) can be tricked and is perhaps unreliable as a test.

I've written this toy reproducer script:


     sudo make -C /X/popt/popt-1.13 install >& /dev/null && echo "==>  
1.13-3.fc9 installed"
     LANG=de_DE@euro rpm --help > /tmp/popt-1.13-iso
     LANG=de_DE.UTF-8 rpm --help > /tmp/popt-1.13-utf
     diff -u /tmp/popt-1.13-{iso,utf}

     sudo make -C /X/src/popt install >& /dev/null && echo "==> 1.15  
     LANG=de_DE@euro rpm --help > /tmp/popt-1.15-iso
     LANG=de_DE.UTF-8 rpm --help > /tmp/popt-1.15-utf
     diff -u /tmp/popt-1.15-{iso,utf}

With popt-1.13-3.fc9 installed (with the popt-1.13-popt_fprintf patch  
applied), I see
differences rendering umlaut's between the output from the 2 locales  
for both 1.13 and 1.15.

(aside) the description column _IS_ aligned, which is/was the rather  
feeble reproducer
  for this issue during popt-1.14 release.

And here is what file(1) has to say on the matter:
     [jbj@wellfleet popt]$ file /tmp/popt-1.13-iso
     /tmp/popt-1.13-iso: ISO-8859 English text
     [jbj@wellfleet popt]$ file /tmp/popt-1.15-iso
     /tmp/popt-1.15-iso: Non-ISO extended-ASCII English text
reproducing your results here.

I have most certainly removed the encoding conversion in popt-1.14 so  
that the --help
columns are aligned. Which likely explains the file(1) output, iconv  
is _NOT_ being
performed, because doing the iconv conversion visibly destroyed the -- 
help column alignment.

So a little more help please. What problem should I focus on? Having  
only American
English kinda hampers my abilities to fix this issue, I really don't  
know what to expect
with de_DE locale encoded display output (although I'm way more  
familiar with
rpm --help than kudzu or random GNOME --help). I can most easily  
detect column alignment
issues, duh.

And sure I want to fix _ALL_ the popt problems. Just which one first?

> Once my LANG is de_DE@euro for popt >= 1.14, the ISO-8859 text  
> seems not
> sane to be written somehow. Please note, that popt 1.13, I was  
> using here
> is not the vanilla one, the following patch was applied (no matter  
> what it
> does exactly):
> http://cvs.fedora.redhat.com/viewcvs/*checkout*/devel/popt/ 
> popt-1.13-popt_fprintf.patch
> Greetings,
>   Robert<popt-1.13-iso.gz><popt-1.13-utf.gz><popt-1.15- 
> iso.gz><popt-1.15-utf.gz>
Received on Mon May 26 00:37:18 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.