Re: HEADSUP: lesstif replaced by motif
On 27/11/2012 07:16, Yaakov (Cygwin/X) wrote: > On Mon, 2012-11-26 at 12:28 +, 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
Re: HEADSUP: lesstif replaced by motif
On Mon, 2012-11-26 at 12:28 +, 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. > (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. Yaakov
Re: HEADSUP: lesstif replaced by motif
On Mon, 2012-11-26 at 10:47 +0100, Dr. Volker Zell wrote: > > Yaakov writes: > > > The following maintainers have Motif-based packages which should be > > rebuilt ASAP: > > > Dr. Volker Zell: libmng, tcm, ted, XmHTML, xpdf. > > Done... Thank you for your prompt attention (as always) to your packages. Unfortunately, it seems Volker Quetschke is no longer around (last message in 2008, no response to last ping), so the grace package needs a new maintainer. Anybody? Yaakov Cygwin/X
Re: HEADSUP: lesstif replaced by motif
On 11/26/2012 05:28, Jon TURNEY wrote: 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) Only the 7-bit ASCII subset of ISO 8859-x is legal UTF-8. This is listed in the ddd PROBLEMS file with solutions "don't use a UTF-8 locale" or "link with lesstif" :-) Isn't the core problem that DDD has been semi-maintainerless[*] for years, and that these are the same as the years of UTF-8's ascendancy? I ask because it's the basis of my guess is that if you tried to provide a patch upstream, it would be ignored. That, or they'd invite you to become the new maintainer. :) So, my advice is to either maintain a private patch for Cygwin DDD or take over maintainership of DDD. [*] https://www.gnu.org/software/ddd/news.html A minimal fix might be to just replace the ISO-8859-1 encoded strings with their ASCII equivalents (e.g. ü -> u) German umlaut-ed characters are generally Anglicized as "ue", "oe", etc. a better solution might be to actually fix ddd, but I have no idea what would be involved. The easiest way to fix this is with iconv(1): $ iconv -f iso-8859-1 -t utf-8 < foo.c > foo-fixed.c $ wc -c foo.c foo-fixed.c N foo.c N+M foo-fixed.c $ mv foo-fixed.c foo.c N is the original file size and M will be at least 1 byte per replaced character, but potentially up to 3 per replaced character. I suspect you'll run into a problem if you're using cygport. It will try to make a patch file for you when it sees that you've run iconv on the -src directory contents, since the corresponding -origsrc files are now different. But, since cygport is running in a UTF-8 locale, it's going to either truncate the 8859 input files or mangle them. You might have to do some shell script gymnastics to avoid this. All the more reason to arm-twist upstream, if you can. Or become upstream. :)
Re: HEADSUP: lesstif replaced by motif
On 19/11/2012 06:50, Yaakov (Cygwin/X) wrote: > The ("Open")Motif toolkit has finally been open-sourced (LGPL2.1), so it > now replaces the poorly-maintained (and now unnecessary) lesstif > implementation in the distro. > > The following maintainers have Motif-based packages which should be > rebuilt ASAP: > > Jon TURNEY: ddd. > Volker Quetschke: grace. > Dr. Volker Zell: libmng, tcm, ted, XmHTML, xpdf. > > Once rebuilt, Motif-based (sub)packages will depend on libXm4. This > should be an API-compatible upgrade (I had no problems with those that I > tested), but please let me know if you encounter problems rebuilding > your packages. 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" :-) (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. [1] https://bugzilla.novell.com/show_bug.cgi?id=254472 [2] https://bugzilla.redhat.com/show_bug.cgi?id=648627
Re: HEADSUP: lesstif replaced by motif
> Yaakov writes: > The following maintainers have Motif-based packages which should be > rebuilt ASAP: > Dr. Volker Zell: libmng, tcm, ted, XmHTML, xpdf. Done... Ciao Volker
HEADSUP: lesstif replaced by motif
The ("Open")Motif toolkit has finally been open-sourced (LGPL2.1), so it now replaces the poorly-maintained (and now unnecessary) lesstif implementation in the distro. The following maintainers have Motif-based packages which should be rebuilt ASAP: Jon TURNEY: ddd. Volker Quetschke: grace. Dr. Volker Zell: libmng, tcm, ted, XmHTML, xpdf. Once rebuilt, Motif-based (sub)packages will depend on libXm4. This should be an API-compatible upgrade (I had no problems with those that I tested), but please let me know if you encounter problems rebuilding your packages. Yaakov Cygwin/X