Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99177 - Damaged display of UTF characters in new version 1.4 of app-text/ding
Summary: Damaged display of UTF characters in new version 1.4 of app-text/ding
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Torsten Veller (RETIRED)
URL: http://ipx10099.ipxserver.de/files/di...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-16 01:40 UTC by Maik Musall
Modified: 2005-11-10 12:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maik Musall 2005-07-16 01:40:26 UTC
app-text/ding 1.4 displays german umlauts incorrectly, i.e. the UTF characters
don't work correctly (see screenshot in URL). My locale is as follows:

LANG=en_US
LC_CTYPE=de_DE@euro
LC_NUMERIC=en_US
LC_TIME=en_US
LC_COLLATE=de_DE@euro
LC_MONETARY=de_DE@euro
LC_MESSAGES=en_US
LC_PAPER=de_DE@euro
LC_NAME=de_DE@euro
LC_ADDRESS=de_DE@euro
LC_TELEPHONE=de_DE@euro
LC_MEASUREMENT=de_DE@euro
LC_IDENTIFICATION=de_DE@euro
LC_ALL=


Reproducible: Always
Steps to Reproduce:
1. invoke "ding"
2. search for some word where german words with umlauts appear

Actual Results:  
Results are displayed, but with damaged umlaut (diaeresis) characters.


Expected Results:  
Display german umlauts correctly

Portage 2.0.51.22-r1 (default-linux/x86/2005.0/2.4, gcc-3.3.5-20050130,
glibc-2.3.4.20041102-r1, 2.4.28 i686)
=================================================================
System uname: 2.4.28 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.12
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.10
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.4.22-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/fax
/usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/bind /var/qmail/control /var/service /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
http://gd.tuwien.ac.at/opsys/linux/gentoo/
ftp://gd.tuwien.ac.at/opsys/linux/gentoo/"
LANG="en_US"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X alsa apache2 apm arts avi berkdb bitmap-fonts bonobo cdr crypt cups
curl dvd eds emboss encode esd f77 fam flac foomaticdb fortran gcj gd gdbm gif
gnome gpm gstreamer gtk gtk2 gtkhtml imagemagick imlib ipv6 jack java jpeg junit
kde ldap libg++ libwww mad matrox mbox mikmod mmx motif mozilla mp3 mpeg nas
ncurses nls oci8 ogg oggvorbis opengl oss pam pdflib perl png postgres ppds
python qt quicktime readline real ruby samba scanner sdl slang spell sse ssl
svga tcltk tcpd tetex threads tiff truetype truetype-fonts type1-fonts usb
vorbis xine xml xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-07-16 03:07:07 UTC
Uhm, you locate is incorrect for UTF-8. It should be de_DE-UTF-8/en_US.UTF-8
Comment 2 Maik Musall 2005-07-17 15:58:11 UTC
locale de_DE.UTF-8 does no longer exist, it's now renamed to de_DE.utf8, and I
suppose there are still some applications that need the old form.

But I don't want UTF. I normally want ISO8859 encoding since I have many files
that are encoded with ISO8859 and I don't want to mix this. Isn't an application
like ding supposed to *respect* my locale and display things in ISO8859?
Comment 3 Heiko Baums 2005-09-04 18:48:22 UTC
Is there a fix in sight? 
I'm having the same problem. 
Comment 4 Torsten Veller (RETIRED) gentoo-dev 2005-09-04 23:59:05 UTC
output of `locale -a`?
does iconv work ie can it convert from utf8?

2 hacks:
LC_CTYPE=de_DE.UTF-8 ding (maybe alias ding="LC_CTYPE=de_DE.UTF-8 ding")

or

cd /usr/share/dict
cp de-en.txt de-en.txt.UTF8
iconv -futf8 -tiso8859-1 de-en.txt > de-en.txt.iso8859-1
cp de-en.txt.iso8859-1 de-en.txt
Comment 5 Heiko Baums 2005-09-05 04:56:19 UTC
(In reply to comment #4) 
> output of `locale -a`? 
 
To make it short only the important lines: 
 
# locale -a | grep de_DE 
de_DE 
de_DE@euro 
de_DE.utf8 
# locale -a | grep en_US 
en_US 
en_US.utf8 
 
So everything important is there. 
 
> does iconv work ie can it convert from utf8? 
 
iconv works. 
 
> LC_CTYPE=de_DE.UTF-8 ding (maybe alias ding="LC_CTYPE=de_DE.UTF-8 ding") 
 
This hack doesn't work. 
 
> cd /usr/share/dict 
> cp de-en.txt de-en.txt.UTF8 
> iconv -futf8 -tiso8859-1 de-en.txt > de-en.txt.iso8859-1 
> cp de-en.txt.iso8859-1 de-en.txt 
 
This hack works. Thanks! 
Comment 6 Torsten Veller (RETIRED) gentoo-dev 2005-09-05 05:11:32 UTC
(In reply to comment #5)
> (In reply to comment #4) 

> > LC_CTYPE=de_DE.UTF-8 ding (maybe alias ding="LC_CTYPE=de_DE.UTF-8 ding") 
>  
> This hack doesn't work.

It should work.
Did you set LC_ALL in your environment?
`locale` shows it - please post it.

 
> > cd /usr/share/dict 
> > cp de-en.txt de-en.txt.UTF8 
> > iconv -futf8 -tiso8859-1 de-en.txt > de-en.txt.iso8859-1 
> > cp de-en.txt.iso8859-1 de-en.txt 
>  
> This hack works. Thanks! 

I've seen that the 'cp's are not needed. One can set the dictionary in ding's
settings (so it could be set to de-en.txt.iso8859-1).
Comment 7 Heiko Baums 2005-09-05 12:09:26 UTC
(In reply to comment #6)  
> It should work.  
> Did you set LC_ALL in your environment?  
> `locale` shows it - please post it.  
  
This is how I had set the variables first:  
LANG=de_DE@euro  
LC_ALL=de_DE@euro  
  
Then for testing purposes and to finally get English compiler outputs in my  
German environment I changed these settings to this:  
LANG=de_DE@euro  
LC_CTYPE=de_DE@euro  
LC_NUMERIC=de_DE@euro  
LC_TIME=de_DE@euro  
LC_COLLATE=de_DE@euro  
LC_MONETARY=de_DE@euro  
LC_MESSAGES=en_US  
LC_PAPER=de_DE@euro  
LC_NAME=de_DE@euro  
LC_ADDRESS=de_DE@euro  
LC_TELEPHONE=de_DE@euro  
LC_MEASUREMENT=de_DE@euro  
LC_IDENTIFICATION=de_DE@euro  
LC_ALL=  
  
Both with the same result regarding ding and your first hack.  
  
But on the ding website http://www-user.tu-chemnitz.de/~fri/ding/ I found this  
in the changelog:  
Changes in version 1.4:   
...  
- Using UTF-8 encoding now, renamed ger-eng.txt to de-en.txt  
...  
  
The ding developers seem to have switched completely to unicode so that this  
bug isn't really a bug but a feature. Maybe this is why your first hack with  
the LC_* veriables doesn't work. But your second hack works as a workaround  
until Gentoo can be switched completely to unicode.  
  
> I've seen that the 'cp's are not needed. One can set the dictionary in ding's  
> settings (so it could be set to de-en.txt.iso8859-1).  
  
I didn't know these settings in ding, too. The cp's are not necessary but have  
also their small advantage. So you can have an iso8859-1 and a utf8 version of  
this file and can set a link to the version you need mainly.  
Comment 8 Maik Musall 2005-11-10 12:30:47 UTC
LC_CTYPE=de_DE.UTF-8 ding

works for me.