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

Re: Arabic vim patch (was - BAD BUG)



Nadim Shaikli <shaikli at yahoo dot com> wrote:
[...]
> Tony, the best way to approach this is to do the following,
>
>  1. Obtain a vim with the 320 patches without the Arabic patch
>  2. Obtain a vim with the 320 patches with    the Arabic patch

OK. The latter is available on the Cream project -- where can I get a w32
binary of the former, anybody? (currently I am using a patched 6.1.300 +gui
+w32 +ole, also from Cream). I suppose that to avoid disrupting my existing
(working) gvim.exe I will need to either give those 6.1.320 executables a
different name, or duplicate my Program Files\vim\vim61 directory, and
everything under it, somewhere else on the directory tree. That also is
feasible but must be thought of in advance.
>
> And try loading that font (make sure to have a previously written
> valid Arabic file handy to load-in/read).  I didn't touch how vim
> loads fonts,
> as far as I remember.  The vim without the arabic patch ought to show
> you arabic characters (it just won't look right and it won't be
> usable :-),

IIRC from my earlier experiments, it will show all characters as isolated
(but not starting, middle or ending) presentation shapes, and it will accept
digraphs and Ctrl-V u methods for entering Unicode (including Arabic). And
with has("rightleft") != 0 it will even display Arabic text right-to-left
but without joining the letters.

> but you ought to see them -- make sure to set the encoding to utf-8.

With ucs-bom in the "fileencodings" my "UTF8+BOM" HTML files with Arabic
text (including the Faatiha, of which I sent you a copy) will automagically
load with the proper fileencoding. Setting tenc=latin1 enc=utf-8 is not a
problem, I already have the "project-specific" vimrc for that. And using a
single vimrc (specified on the command-line) with all binaries will make it
sure that any observed differences are not due to a difference in the vimrc.

> I really want to isolate the problem to get forward progress; if its
> something that the patch is doing - I'll go and fix it, but I since I
> didn't touch the font loading (as that was working properly), I highly
> doubt that I screwed anything up in that regard.

So -- maybe someone else did, or maybe there is something I didn't
understand properly. That's the problem with complex programs: the more
bells and whistles, the more things that can screw up. Every programmer (and
I have been one) knows it from dire experience.

[...]
> Disclaimer - I am _not_ a windows developer/user, so the patch and
>              code might reflect my ignorance in that issue.

That is understood. And the arabic.txt helpfile that you wrote is a Very
Good Thing. I'm still willing to add a paragraph or two to it about
combining characters (harakat etc.) but I won't do it without your go-ahead.
Or maybe mbyte.txt would be a better place for what I have in mind since
some other languages (such as Hebrew) also use combining characters. I still
think there are particularities that are proper to Arabic though.
>
> Regards,
>
>  - Nadim

Regards,
Tony.