• lpr hangs on emojis

    From Greg Marks@21:1/5 to All on Fri Feb 17 04:50:01 2023
    When trying to print a file that contains emojis with the lpr
    command, not only do the emojis not print, nothing following the first non-printing emoji prints. (This makes it a hassle to print certain
    e-mails piped to lpr using mutt.) As a small example, after entering
    the command:

    echo -e "Hello\n\0360\0237\0230\0212\nGoodbye" > /tmp/test.txt && cat /tmp/test.txt && lpr /tmp/test.txt

    only the first of the three lines prints.

    One way to at least get all of the text to print is to use pango to
    convert from UTF-8 to PostScript:

    cat /tmp/test.txt | paps --paper=letter > /tmp/test.ps && lpr /tmp/test.ps

    Apart from such commands being a bit unwieldy when trying to print
    e-mails, it's typically only apparent that an emoji is interfering with
    lpr when most of the file doesn't print. Also, if the emoji is actually intended to communicate something, it would be nice if it appeared on
    the printed page.

    It seems that the enscript command works a bit better than lpr here;
    the entire file prints along with the octal codes for the included
    non-printing characters. So there is at least an indication that there
    is some other character in the text that one might be inclined to go
    back to the computer screen to view.

    Does anyone have a good way of printing text that contains emojis?

    Best regards,
    Greg Marks

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEEuGu03cznhNMWTweOJ4afplPyaegFAmPu+J4ACgkQJ4afplPy aejFRw//WotXi3z1cL2tGg5dXhAdltkb6KYRZl7JwX1JH9M5xuKwY7sCgxHTdSJA 6fmG89uI6pYGBxbmA/RqDmezJql8LEEyBBA1V/dIo1YuqeOHZJ68kjW+8a47+9XC O6zxLsUQLLng+KcBgMMfhabmzPlQ/bLBNmD1KVCBHDOCUmgQQSYQmy9a4AHqwZQF 6XJBe0WKWhWt0OQmnLX9pQ+hOeRN3oOtFpC2QJwLTVBIsKGzdVF76jG4eDYkvim9 Ny+rKj390Tj3JL2cAsAoE+/032C0OW5N/+HHnqs2BQJKuFoWoodHDORGzn+Uf5Lf c2t/Y3jCXqMk8ZZZFIKo+rAw0Q3bg/R/Otxtuy1fD4fU3qBluF5Ej3BuaNv97Bst zcsqJ7W7t+PRHdCpPjKWHFMqVXNPhOb8PBFFfSWHhI7G4LWob+bH6P6jkUmAaDe1 On9y5SjB4FSZutMfw/COoQZd3Ip+RepzBBQCQBK+sY0qWDxJiStVx4WHsjXQn9yd 8NkEigbRpX3xeDpr3Mv6VAz9ehm5L9xSvoAynmEcsyVpN8iXt1q2OBCap5aiea4l 4LX2UydzJ7fg1UTBAJ1E4+Gjj2lKEtS2/P8AYxeQ4kpUX80Q07LI6t7zkdwJIH5s TvwXZdkgFptiuaKDWWKiMpJPccza0Sc5NcLfFE0c6snnX+MehWc=
    =S4RP
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Charles Curley@21:1/5 to Greg Marks on Fri Feb 17 05:30:01 2023
    On Thu, 16 Feb 2023 21:46:40 -0600
    Greg Marks <gtmarks@gmail.com> wrote:

    Does anyone have a good way of printing text that contains emojis?

    I took your test.txt file, html-ized it, and looked at it in a browser.
    I then "printed" it to a PDF file. Both showed the 😊 emoji. I didn't actually print it, but that should work.

    --
    Does anybody read signatures any more?

    https://charlescurley.com
    https://charlescurley.com/blog/

    -----BEGIN PGP SIGNATURE-----

    iQGzBAEBCgAdFiEEON3On5clQt3imusRdRRtN6MyEMsFAmPvAc4ACgkQdRRtN6My EMtOKgv+N+EAChWBN0aj+8JjMK5rLtdE/3T8ZhPe/AgTjkx4sNdvvxSF6sFcxOzm kQ8eVoqeYpUK9EjIeBx35z0xHpVp6AUVlR/Y9MNkymCnsq5fBLK9WI1TSrnElPw9 aCrEMynxfRQ6gGwYPs5KtX5GwgzguNLforxu/IV6b2VdXT05U6Hwxu/yhmSvDdXq 0d5VT+tReaUJ5nMnYYGXqReZerA7bOhb5/ZVHPrkwnLwpBFJT3jO8Nu2/O+I+CN+ oeYRqM/eoiaR3PDz/ihI/WQIlqtcMRQ7AGODvm1LgVshBfNh5XJ8h46G+TObRXvr FTfKvBk60eNq7cxxehK+2XS93ZQesXm6ddLBqoIVSXodv1wfVVo/aDxOCAifVN+5 1SoCE4ftg+77I6aZm3PMzBamkmqIrdrbXbUT0r+hdLZAZR2TivCvfnCnXXLavf6v t5HFqv2v8D0iDSb3sbnTg9rYi4N394psDuyHqZXa7TQhfWy6aU6JbNBqOahm0s+1
    YXdJFGiR
    =3oGY
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eduardo M KALINOWSKI@21:1/5 to Greg Marks on Fri Feb 17 16:40:01 2023
    On 17/02/2023 00:46, Greg Marks wrote:
    When trying to print a file that contains emojis with the lpr
    command, not only do the emojis not print, nothing following the first non-printing emoji prints. (This makes it a hassle to print certain
    e-mails piped to lpr using mutt.) As a small example, after entering
    the command:

    echo -e "Hello\n\0360\0237\0230\0212\nGoodbye" > /tmp/test.txt && cat /tmp/test.txt && lpr /tmp/test.txt

    only the first of the three lines prints.

    I find it highely unlikely that the printer understands UTF-8, let alone
    that its built-in fonts contains emoji. Maybe it supports the whole
    ISO-8859-1 character set, but probably only ASCII.

    It might be trying to interpret the non-ASCII codes as control
    sequences, or it just doesn't know what to do with them.

    Does anyone have a good way of printing text that contains emojis?

    You can convert it to PDF. Or open the file in word processor and print
    from there. Even if it's just plain text, it'll be converted to a format
    that the printer understands, including extra fonts.

    --
    Eduardo M KALINOWSKI
    eduardo@kalinowski.com.br

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sarunas Burdulis@21:1/5 to All on Fri Feb 17 16:30:01 2023
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------sOkofhScJEEod1wEQjuyAUL8
    Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64

    T24gMi8xNi8yMyAyMjo0NiwgR3JlZyBNYXJrcyB3cm90ZToNCj4gV2hlbiB0cnlpbmcgdG8g cHJpbnQgYSBmaWxlIHRoYXQgY29udGFpbnMgZW1vamlzIHdpdGggdGhlIGxwcg0KPiBjb21t YW5kLCBub3Qgb25seSBkby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purIYD0FAmPvl2IFAwAAAAAACgkQBw+NpurIYD0g kwgAhkzl3eeJ+JIjgUz/p0PIwXN+uNCeV+TkjmOKh9sEqyjwA/5qBB3ZinuKsC/4JPMZwKT/M2nU 4as0+MtEgoxvYovbU68WaCLkbt1y8GvKtRLWsRtRZq0Q0Y4t6t5pqONCeIdvEQjK0jOxX+jaHMF3 8HSYHmAGOiTN51eG+F5xfB4z3BURn0fwEvig0Rt3Vl9ZCDWWJ2CwX0OkeFFiRf8d9u/Yn2MePnQU B3g7U/6DN7ndtVHoG0yLL6HAOdYDPnZANK93OC3YxNwxHNc2Sci42I8bKUNFXBhN+L5aZ0xQOBuQ 1g1rjhNV9IOvDW1g5gfGuMNAgBBdYsKZ02WBv6sEgA==
    =qRIP
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)