[Top][All Lists]

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

Re: lynx-dev UTF-8 display questions (was: Superscripts)

From: Sergei Pokrovsky
Subject: Re: lynx-dev UTF-8 display questions (was: Superscripts)
Date: 08 Jun 2000 19:43:42 +0700
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.6

>>>>> Klaus Weide writes:
  Klaus> It *is* due to "excessively" long lines in a sense, but not in the
  Klaus> input stream.

  Klaus> You are running into one of the fundamental problems of
  Klaus> displaying UTF-8 with a display library that is not
  Klaus> UTF-8-aware.  The display library (ncurses in your case,
  Klaus> iirc) makes the assumption that one byte == one character
  Klaus> (position).  So it would wrap a line (or possibly truncate
  Klaus> it) after 80 characters in a 80x25 window.

I really had install fresh ncurses and xterm; but lynx didn't want
to compile with ncurses (at least, not the native cc, which had many
objections against the lynx code, like ; after cpp-expanded structure
declarations etc), so I did configure --with-screen=slang even before
my complaint.

  Klaus> That means that, for lines full of UTF-8 characters in a
  Klaus> range where each character is encoded as two bytes (which
  Klaus> includes Cyrillic), only about half of the available
  Klaus> horizontal display width is usable.

Well, that may be the reason why some innocent tables are not
formated, if they contain a few accented letters.

  Klaus> Lynx 2.8.3 is actually improved in this respect: now lynx
  Klaus> takes this into account and breaks the line in an appropriate
  Klaus> place.  That's why you see the line broken between words, and
  Klaus> not broken or truncated in the middle of the third word,
  Klaus> which would be the case in previous versions.


  Klaus> There is one existing workaround, but only if you compile
  Klaus> lynx with slang instead of (n)curses: compile with
  Klaus> SLANG_MBCS_HACK defined.  For example, (this is the way I
  Klaus> pass additional flags to the compile process)

  Klaus>    ./configure --with-screen=slang [...]
  Klaus>    make SITE_DEFS="-DSLANG_MBCS_HACK"

  Klaus> It works well for me in most $TERMinal types (but not all -
  Klaus> although those aren't UTF-8 capable anyway).

I've tried that -- to no avail.  Nothing is changed.

I must admit though that I've simply removed the object files and
rerun ./configure --with-screen=slang; for some reason
"make distclean" removes too much and no ./configure is possible after
it; and I wouldn't like to restart everything form the tarball, given
the amount of massaging necessary to make the sources pass through the
Solaris cc.

  Klaus> With the advent of an UTF-8-aware ncurses, this problem may
  Klaus> be solved soon (for those who have it) (after code changes in
  Klaus> lynx).

I'd like to live to see it :)

There's another question about lynx massaging.  I've changed the
superscript rendition to my liking, but there are some other similar
changes I'd like to make.  One is the DFN element.  I'd like to
implement it with quotes in lynx.  The problem is that I'd like to have
curly quotes if available.  Is it possible to specify Unicode quotes
_and_ to be able to have a translation if they are missing in the
current font/charset?  (For the time being I've put _underscore_
there to mark DFN.)


; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

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