Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db2x_manxml fails on non-ascii chars #91

Closed
vesath opened this issue Jun 29, 2015 · 5 comments
Closed

db2x_manxml fails on non-ascii chars #91

vesath opened this issue Jun 29, 2015 · 5 comments

Comments

@vesath
Copy link

vesath commented Jun 29, 2015

In maintainer mode, db2x_manxml from docboox2x-0.8.8 fails to convert conky-1.10.0's docs.mxml to a man page because it contains non-ascii characters. In fact, db2x_manxml runs iconv -futf8 -tascii as a subroutine and iconv itself fails on invalid characters.

I'm not sure what should be done about this. Removing the characters (see patch below) allows the manpage to be generated.

@vesath
Copy link
Author

vesath commented Jun 29, 2015

Here is the error message:

/usr/bin/iconv: illegal input sequence at position 7849
/usr/bin/db2x_manxml: program in pipeline exited with an error
doc/CMakeFiles/docs.dir/build.make:51: recipe for target 'doc/docs.html' failed
make[2]: *** [doc/docs.html] Error 1
CMakeFiles/Makefile2:218: recipe for target 'doc/CMakeFiles/docs.dir/all' failed

And the obvious patch:

diff -aur old/doc/config_settings.xml new/doc/config_settings.xml
--- old/doc/config_settings.xml 2015-06-21 14:49:06.000000000 -1000
+++ new/doc/config_settings.xml 2015-06-29 10:05:00.147318479 -1000
@@ -80,7 +80,7 @@
         </term>
         <listitem>A comma-separated list of strings to use as the bars of a graph output
         to console/shell. The first list item is used for the minimum bar height and the
-        last item is used for the maximum. Example: " ,_,▁,▂,▃,▄,▅,▆,▇,█".
+        last item is used for the maximum.
         <para /></listitem>
     </varlistentry>
     <varlistentry>

@andreas--e
Copy link

That's more like a workaround than a real fix IMO. Think of manuals in complex scripts like Japanese or so. These would most likely still fail because what you did is simply remove the non-ascii part (see "patch" snippet), instead of properly handling it. Currently it works just fine because (and only because) the source language is English. But that need not necessarily be the case.

@marcpayne
Copy link
Contributor

@andreas--e The commit by @paulegan (which is the one that got merged) properly addresses the problem without removing the non-ascii characters.

@andreas--e
Copy link

Whoops...looks it was late then, and my synapses were no longer working properly... Thanks for the heads-up. The "that" in my statement "That's more like a workaround than a real fix IMO" was (obviously) referring to vesath's patch, which suggested that the "fix" was just to remove those "blocky" characters after the "Example:" text. (Made me giggle TBH.)
Sorry for the noise. In any case, it would be better if the person who can provide a proper fix also participated in this report, instead of doing things on the quiet like Macavity the Mystery Cat ;-)

@vesath
Copy link
Author

vesath commented Aug 31, 2015

Thanks for your insight, @andreas--e, but obviously nobody (myself included) never mistook my patch as a proper fix... Just a workaround so conky compiles for the time being. That's why I wrote: "I'm not sure what should be done about this..."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants