Hi Ralph! At 2017-11-02T12:04:43+0000, Ralph Corderoy wrote: > Use `strace -fe execve' to spot the preconv invocation. Use that > directly to see if the error can still be generated. Add preconv's -d > option for debug. Is GROFF_ENCODING set anywhere in the environment? > Do the bytes at the start of sample_docs.mom look reasonable? Does it > contain any coding tags picked up by preconv? Hopefully, the -d option > will show that.
Thanks for your tips. Here's what I found: execve(".../preconv", ["preconv", "-", "contrib/mom/examples/mom-pdf.mom"], [/* 68 vars */ Due to the "-" argument, I think pdfmom is running preconv in a pipeline. But that may not be important as I can reproduce the problem without that argument. $ ./preconv contrib/mom/examples/mom-pdf.mom ./preconv: encoding `' not supported, not a portable encoding $ ./preconv -d contrib/mom/examples/mom-pdf.mom default encoding: `UTF-8' file `contrib/mom/examples/mom-pdf.mom': no encoding tag len: 21946 uchardet read: 21946 bytes charset: ./preconv: encoding `' not supported, not a portable encoding So, nope, no encoding tag. GROFF_ENCODING is not set in my environment. Incidentally, $ file contrib/mom/examples/mom-pdf.mom contrib/mom/examples/mom-pdf.mom: troff or preprocessor input, ASCII text ...and it's not lying. Every byte in the file is in the range \x00-\x7f. $ ./preconv -eascii contrib/mom/examples/mom-pdf.mom ...works as expected, and passes the file through on stdout. -- Regards, Branden
signature.asc
Description: PGP signature