[elinks-users] ELinks 0.12pre5 - Garbled display with UTF-8 I/O enabled.

Chris Jones cjns1989 at gmail.com
Mon Sep 14 10:19:56 PDT 2009

I built elinks.-0.12pre5 from the tarball at http://elinks.or.cz.

$ ./elinks -version

ELinks 0.12pre5
Built on Sep 14 2009 11:35:21

Standard, IPv6, gzip, UTF-8, Periodic Saving, Viewer (Search History,
Timer, Marks), Cascading Style Sheets, Protocol (Authentication, File,
FTP, HTTP, URI rewrite, User protocols), SSL (OpenSSL), MIME (Option
system, Mailcap, Mimetypes files), LED indicators, Bookmarks, Cookies,
ECMAScript (SpiderMonkey), Form History, Global History, Scripting
(Spidermonkey ECMAScript), Goto URL History

For this test, I ran ELinks in the following context:


$ xterm -fn "-gnu-unifont-medium-r-normal--16-160-75-75-c-80-iso10646-1" \ 
        -tn "xterm-256color" -u8

The xterm is built with 256-color support enabled.

~/.elinks/elinks.conf has the following enabled for this terminal:

## terminal.xterm-256color
#  Options specific to this terminal type (according to $TERM value).

  ## terminal.xterm-256color.charset <codepage>
  set terminal.xterm-256color.charset = "utf8"
  ## terminal.xterm-256color.underline [0|1]
  set terminal.xterm-256color.underline = 1
  ## terminal.xterm-256color.transparency [0|1]
  set terminal.xterm-256color.transparency = 1
  ## terminal.xterm-256color.colors <num>
  set terminal.xterm-256color.colors = 3
  ## terminal.xterm-256color.block_cursor [0|1]
  set terminal.xterm-256color.block_cursor = 1
  ## terminal.xterm-256color.restrict_852 [0|1]
  set terminal.xterm-256color.restrict_852 = 0
  ## terminal.xterm-256color.utf_8_io [0|1]
  set terminal.xterm-256color.utf_8_io = 1
  ## terminal.xterm-256color.m11_hack [0|1]
  set terminal.xterm-256color.m11_hack = 1
  ## terminal.xterm-256color.type <num>
  set terminal.xterm-256color.type = 2

I observed the following:

1. The screen becomes garbled when scrolling - especially, but not only,
   on pages with large numbers of non-latin characters. This requires
   issuing a Ctrl-L to refresh the screen after each scrolling action.

2. There is some “tearing” - i.e. the underlying xterm’s black
   background shows through the white ELinks background: 
   This can affect a few square areas randomly placed on the page, or
   materialize as a black vertical bar on the right-hand side of the
   display, etc. Some of these black spots can be reset via Ctrl-L,
   others not. 
   Although in this particular case, the black marks are not randomly
   placed, a link that may clarify - and where they only appear after a
   Ctrl-L is issued to clear the screen - is the following:


   Black squares in this instance would appear to materialize where
   there are some form of "end-of-line".

   An interesting (?) aspect with this particular page, is that if I
   switch to another “X” workspace and return to the xterm that’s
   running ELinks, the black spots momentarily disappear and the next
   Ctrl-L brings them back.

3. When adding GNU/screen to the picture, with other windows that have a
   black background, such as those that are running bash shells, as soon
   as the black marks appear in the ELinks window, these other windows
   become permanently garbled with white vertical lines that are some
   5-10 cells high to the right of the display. Ctrl-L has not effect on

4. After testing with 0.12pre5, I started my old 0.11.4 version and I
   observed the same behavior. I edited ~/.elinks/elinks.conf, changing
   the value of terminal.xterm-256color.charset back to 'us-ascii' and
   that took care of the problem.

Tests were mostly done courtesy of Alan Wood’s excellent web site:


Please let me know if you need additional information or further testing
my end.


More information about the elinks-users mailing list