This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: HEADSUP: lesstif replaced by motif


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...

[1]
https://build.opensuse.org/package/view_file?file=ddd.wrapper&package=ddd&project=devel%3Atools
[2]
http://web.archive.org/web/20070630102512/http://www.motifzone.net/files/documents/Fonts_UTF-8_WhitePaperv6.pdf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]