> However, pdfmom is supposed to accept all the same > options as groff. Here, it does not, since "-Kutf8 -k" is > acceptable to groff. > > groff -Tpdf -Kutf8 -k -mom timeline.mom > timeline.pdf > > works but > > pdfmom -Kutf8 -k timeline.mom > timeline.pdf > > fails.
In the perl script, both "-k" and "-K" options _assign_ the $preconv variable (which ultimately gets passed to groff), so the second overwrites the first, leading to the encoding info "utf8" getting lost. However, "-Kutf8 -k" feels unnatural to me, whereas "-k -Kutf8" feels reasonable. If pdfmom was only tested with the latter order of options, it would not have been noticed that "-k" got lost, because it would be implied by groff seeing "-K". I guess the simplest fix would be to have pdfmom _append_ the "-k" and "-K" options to $preconv, i.e., replacing $preconv=$c; by $preconv.=' '.$c; at all three occurrences (the space makes sure the option strings don't run together). But I have very little experience with perl, perhaps a cleaner solution exists.