Update of bug #66287 (group groff): Status: None => Need Info Assigned to: None => barx
_______________________________________________________ Follow-up Comment #1: [comment #0 original submission:] > The files [http://git.savannah.gnu.org/cgit/groff.git/tree/contrib/mm/groff_mmse.7.man contrib/mm/groff_mmse.7.man] and [http://git.savannah.gnu.org/cgit/groff.git/tree/doc/meintro_fr.me.in doc/meintro_fr.me.in] each have an encoding tag near the end of the file in a Local Variables block. Unfortunately, preconv looks only at the first two lines of a file for encoding information. Only if the file isn't seekable... > So if the user doesn't explicitly tell preconv what the encoding is for these file, and none of preconv's other heuristics works, it will guess the wrong encoding. I recall attempting this before. The problem is that `preconv` is a preprocessor and supposed to operate in a pipeline. For it to behave as you desire, it would need to "sponge" up all of its input before writing it back out. I think the status quo is the best we can do for shipped files without heavily refactoring preconv and potentially doing violence to the pipeline/filter concept. > Give preconv a better chance to succeed by putting the encoding tag where preconv looks for it. > > This does split up file information between the top and bottom of the file. But plenty of .mom files do this; [http://git.savannah.gnu.org/cgit/groff.git/tree/contrib/mom/examples/sample_docs.mom contrib/mom/examples/sample_docs.mom] and [http://git.savannah.gnu.org/cgit/groff.git/tree/doc/automake.mom doc/automake.mom] are two examples. > > To see preconv go awry with the current versions of the files, run this command in a UTF-8 terminal: > groff -k -Tutf8 -man contrib/mm/groff_mmse.7.man | fgrep Hagg Hmm, can't reproduce a problem here with _groff_ 1.23.0 or Git HEAD. $ ~/groff-stable/bin/groff -k -Tutf8 -man contrib/mm/groff_mmse.7.man | grep -F Hagg Jörgen Hägg ⟨jorgen.h...@axis.se⟩, Lund, Sweden $ ~/groff-HEAD/bin/groff -k -Tutf8 -man contrib/mm/groff_mmse.7.man | grep -F Hagg Jörgen Hägg, Lund, Sweden > and this command in a latin-1 terminal: > groff -k -Tlatin1 -me -mfr -Ww doc/meintro_fr.me.in | fgrep Babey ...nor this one (in a Latin-1 terminal). Is something breaking preconv on your system? Can you do some experiments with `preconv -d` and see what it says? $ ~/groff-stable/bin/groff -k -Tlatin1 -me -mfr -Ww doc/meintro_fr.me.in | fgrep Babey Adapté au français par Grégoire Babey $ ~/groff-HEAD/bin/groff -k -Tlatin1 -me -mfr -Ww doc/meintro_fr.me.in | fgrep Babey Adapté au français par Grégoire Babey _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?66287> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
signature.asc
Description: PGP signature