[Alpine-info] UTF-8 test message for your viewing (dis?)pleasure
markrcrispin at panda.com
Mon Mar 9 13:16:05 PDT 2009
On Mon, 9 Mar 2009, Eduardo Chappa wrote:
> [Mark, (and everyone else) please do not attack me in a public forum.
If you do not like being corrected in public, then don't make false
statements that need correcting in public.
> There is no guess in the code. The decision of the code is clear.
There you go again.
You see something in a snippet of code, assume that you now know all that
there is to know, and then contradict me.
You don't know everything that there is to know. There is more to the
width calculation than the code that you found.
> But there is a problem, and it needs to be fixed. Would you
> like to help solving that issue?
Don't you understand yet?
There is no solution.
There are only compromises. A compromise will work well in some cases and
less well in other cases.
You can optimize for your particular environment, at the cost of
pessimizing some other environment.
Windows Alpine double-width displays the codepoints that are reported as
double-width. UNIX Alpine could do something similar by sending a cursor
positioning command after each character.
Since there is also the possibility of zero-width and single-width guesses
being wrong (more compromises), this has to be done after ALL characters,
not just double-width. Otherwise you haven't "fixed" it, you have just
done a different compromise.
The users will be unhappy at how much slower and bandwidth-intensive
display has become.
The real solution is to give up on the notion of Alpine running in a
terminal emulator. If UNIX Alpine were to display in an X window (NOT
under xterm, but as its own X window application), it becomes possible to
use the knowledge gained from having the rendering engine in the same
application to do correct width judgements.
That is the ONLY solution for characters (e.g., Arabic) that have no
meaningful fixed-width representation.
The only problem is, I don't know why anyone would want to use the result.
There are many GUI-only email clients which have a huge head start.
The lesson that you should learn from all of this is that, sometimes, what
seems to be a "simple" solution is neither simple nor a solution.
-- Mark --
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.
More information about the Alpine-info