LOGIN / SIGN UP

#201 Title set to ``<INVALID>'' when one or more characters cannot be translated by iconv

Reported by: Martin Tournoij (Carpetsmoker) Assigned to: Claes Nästén (pekdon)
Phase: release-0.1.11 Component: windowmanager
Type: bug Status: closed
Priority: 3: Medium
Watchers:

Description

PekWM uses iconv for character translation in the title bars. If this fails even if just one character can't be translated then the title bar is set to ``<INVALID>. This happens for example on OpenBSD where iconv doesn't seem to work with UTF-8.

Instead, displaying a square (″) for untranslatable characters OR silently ignoring them but displaying a warning message would be a lot better than displaying no windows title at all.

Attached is a quick patch silently drop untranslatable characters. This seems to be fairly easy. The above will require some more work (But a title missing a few characters is better than no title at all)...

2010-02-19

18:59:26

Added autoconf check to detect and use the iconvctl if available, closing.

18:59:22 changed from open to closed
18:41:45

Looking into adding a check for iconvctl and using it when available.

18:41:42 to release-0.1.11
18:41:42 changed from new to open
18:41:42 changed from Andreas to Claes Nästén

2009-09-14

16:32:11

The documentation of iconvctl() that I found says it is only supported by GNU libiconv. Does OpenBSD use GNU's libiconv or is the documentation outdated?

16:32:10 changed from Claes Nästén to Andreas

2009-09-12

03:11:54

Hm, can't I attach files? Well, here is the patch:

--- src/Util.cc.orig Sat Sep 12 02:36:42 2009 +++ src/Util.cc Sat Sep 12 02:40:25 2009 @@ -432,6 +432,10 @@

 do_iconv (iconv_t ic, const char **inp, size_t *in_bytes,
           char **outp, size_t *out_bytes)
 {

+ int one = 1; + + iconvctl(ic, ICONV_SET_DISCARD_ILSEQ, &one); +

 #ifdef ICONV_CONST
     return iconv(ic, inp, in_bytes, outp, out_bytes);
 #else // !ICONV_CONST