less is not displaying what it considers as unassigned utf8 unicode characters

Viewed 24

Not a question but a small contribution, since I was not finding the information anywhere.

The problem appears even with a proper utf8 locale with "older" versions versions of less.

If you cannot update to a version of less correcting the issue, I found a workaround :

export LESSUTFBINFMT=*n%C

this instructs less to process any Unicode code points that were successfully decoded and display them with normal attributes (*n) and as-they-are (%C).

Notes:

  • I found the %C format by trial-and-error, I didn't find it explicitly documented.
  • I found this description of the issue : redhat bug 1074489

It mentions a newer version of less solving it in 2014, but I still run into this problem with a less-458-9.el7 from 2018.

0 Answers
Related