groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] mom : unicode in .INCLUDE'd files


From: E. Hoffmann
Subject: Re: [Groff] mom : unicode in .INCLUDE'd files
Date: Sat, 22 Jul 2017 17:00:37 +0200

Am Fri, 21 Jul 2017 16:28:04 -0400
schrieb Peter Schaffter <address@hidden>:

[...]
> >     $ soelim foo | preconv | groff -Tutf8 | grep .
> >     foo: ÄÖÜ SS ÒÓÔÕŎŌ Ç äöü ß òóôõŏō ç
> >     bar: ÄÖÜ SS ÒÓÔÕŎŌ Ç äöü ß òóôõŏō ç
> >     $
> >     $ groff -V -Tutf8 -sk foo
> >     preconv foo | soelim | troff -Tutf8 | grotty

Thanks a lot.

So, the solution's first step is to replace the .INCLUDE macro with the
plain .so request, and the second step is the preconv-pipe.

Something remains.

    $groff -Tutf8 -V -sk example.mom

gives:

    >preconv -eutf8 example.mom | soelim | troff -Tutf8 | grotty

Output:

    >        Abschnitt.DOCTYPE     DEFAULT UNICODE: Ä‐Ö‐Ü Ò‐Ó‐Ô‐Õ‐Ŏ‐Ō‐
    > Ç ä‐ö‐ü‐ ß ò‐ó‐ô‐õ‐ŏ‐ō‐ ç so’eD FILE BEGINS: UNICODE: Ã‐Ã‐Ã  Ã‐Ã‐
    > Ã‐Ã‐Å‐Å‐ à ä‐ö‐ü‐ à ò‐ó‐ô‐õ‐Å‐Å‐ ç

But I want pdfmom and change that to

preconv -eutf8 example.mom | soelim | pdfmom > example.preconv.pdf

   I get a nice pdf-file containing all latin1-characters.  This is
progress!

    But the pdf does not show the characters " Ŏ Ō  ŏ ō " .

The error message:

    example.mom:8: warning: can't find special character `u004F_0306'
    example.mom:8: warning: can't find special character `u004F_0304'
    example.mom:8: warning: can't find special character `u006F_0306'
    example.mom:8: warning: can't find special character `u006F_0304'

As Ralph pointed out:

>>  Those are Unicode codepoints, but what encoding are you using to
>>  represent them in a file as bytes?  Is it UTF-8?  Only `Ŏ', U+014E,
>>  isn't in ISO 8859-1, AKA Latin1.

I am using the gvim editor with encoding=utf-8 .

The "ga" command gives:

    <Ŏ> 334, Hex 014e, Oktal 516
    <Ō> 332, Hex 014c, Oktal 514
    <ŏ> 335, Hex 014f, Oktal 517
    <ō> 333, Hex 014d, Oktal 515

As it seems, the preconv-pipe manages latin1, but not the "true" utf-8.

Is there something else I can do?

Cheers, Erich




reply via email to

[Prev in Thread] Current Thread [Next in Thread]