HEADSUP: lesstif replaced by motif

Jon TURNEY jon.turney@dronecode.org.uk
Fri Nov 30 16:07:00 GMT 2012

On 27/11/2012 07:16, Yaakov (Cygwin/X) wrote:
> On Mon, 2012-11-26 at 12:28 +0000, Jon TURNEY wrote:
>> I had look at rebuilding ddd with openmotif.
>> This shows a rather obvious problem: The initial output to the gdb window
>> stops before the 'ü' in "Dorothea Lütkehaus" (internally this is ISO-8859-1
>> encoded and presumably forms an invalid UTF-8 sequence)
>> This is listed in the ddd PROBLEMS file with solutions "don't use a UTF-8
>> locale" or "link with lesstif" :-)
> Don't use a UTF-8 locale, in this day and age?  Use an inferior (and now
> obsolete) implementation instead of the far-superior original?  That
> kind of "advice" points the finger squarely at ddd as the problem.

To be fair, that was written in 2003.

>> (Even when built with lesstif, there are known character encoding issues e.g.
>> source files containing UTF-8 do not display correctly in a UTF-8 locale [1],
>> man/info/ddd -h are ISO-8859-1 encoded [2])
>> I'm not sure how to approach this.  A minimal fix might be to just replace the
>> ISO-8859-1 encoded strings with their ASCII equivalents (e.g. ü -> u), but
>> since OpenMotif apparently does now know about UTF-8, a better solution might
>> be to actually fix ddd, but I have no idea what would be involved.
> I would look at Fedora's and Gentoo's patchsets:
> http://pkgs.fedoraproject.org/cgit/ddd.git/tree/
> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-util/ddd/
> I think a combination thereof may fix most of these issues.

I have already looked at those patches.

A patch to to fix the manpage encoding issue is already applied in the
existing package.

The ddd-3.3.11-lang.patch from Fedora, forcing the locale to "C", looks like
it should help, but doesn't actually seem to.  I don't understand why that
doesn't work, but 'export LANG=C' (which should be equivalent) does.

(SUSE uses slightly more complex approach with a wrapper script for ddd which
changes the locale if it is a UTF-8 one [1])

As far as I can tell, no linux distribution is currently shipping a ddd linked
against an OpenMotif libXm at the moment (except maybe RH EPEL).

I think some sort of code changes would be needed to properly display UTF-8
source files, although reading [2] is not that helpful in working out what
they might be...


More information about the Cygwin-apps mailing list