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

Vim-6.0 & Arabic



A couple of us are trying to add Arabic (8859-6) support to VIM-6 and we
have the following questions,

 1. Why is it that whenever we type an Arabic character - "KeyTyped" is set
    to FALSE (in getchar.c) - we've had to comment lines 2033-2038 out ?
    Why is "typebuf.tb_maplen" resulting in > 0 ?  And how to fix it ?

 2. With our current .vim and keymap files we can see all Arabic 8859-6
    characters without a problem, but we need to add the shaping code.
    The shaped letters, for those unfamiliar with Arabic, are not supposed
    to be stored to file/memory (unicode dictation :-) and so we need to
    intercept the call to the actual display function and replace the 8859-6
    encodings with ISO-10646 Form-B ones.  Here's the question -- where is
    the best place to make that intercept (file, function, etc) ?

    In other words, we want to keep the buffer content as it is now, we
    merely want to modify what the display engine shows on screen (and not
    touch anything else) -- our encoding is in the 0600 - 06FF & FE70 - FEFF
    range.

With our current code, we can shape a few letters - but we end up modifying
the contents of the buffer (in memory and/or on disk if we were to save).
The source code is in,

  http://www.arabeyes.org/cgi-bin/cvsweb/arabeyes/vim/

The font file used is,

  http://www.arabeyes.org/~nadim/vim/10x20.bdf.gz

Note that you'd need the following settings,

  :set keymap=arabic
  :set guifont=-misc-fixed-medium-r-normal--20-200-75-75-c-100-iso10646-1
  :set encoding=utf-8
  :set rightleft
  :set arab

 $ vim -g

In 'Insert' Mode try using the following characters to see what I'm talking
about - "s", "u", ";" - try various different positions within a word to
see them mutate.

BTW: Characters get shaped in accordance to their location within a word -
what has to remain in memory (for searches) and on disk (for saves/restores
as well as interoperability with other programs) is the ISO-8859-6 encoding.

So how to fix-up "KeyTyped" and what is the best interception point for the
display (hopefully there is ONE common call for all the display functions) ?

Many thanks for your help in advance.

 - Nadim


__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1