Loading ...
Sorry, an error occurred while loading the content.

Re: [PATCH] make adding new letters to arabic.c easier

Expand Messages
  • Ali Gholami Rudi
    ... It did redirect it but it was not shaped (no unicode presentation forms that results from arabic_shape()); just normal unicode chars. Anyway, in my quick
    Message 1 of 46 , Jun 3, 2009
    • 0 Attachment
      Bram Moolenaar <Bram@...> wrote:
      > OK, so the input() strings are not redirected. This works:
      >
      > redir >> test.out
      > call feedkeys("testing\<CR>")
      > echo input("say ")
      > redir END
      >
      > But perhaps the echo command is sufficient to get arabic shaping?
      >
      > redir >> test.out
      > echo "testing"
      > redir END

      It did redirect it but it was not shaped (no unicode presentation forms
      that results from arabic_shape()); just normal unicode chars.

      Anyway, in my quick glance searching for dependencies, arabic.c seems to
      be mostly self contained. So I think using it directly should not be
      that hard. A mere file data (char *) to unicode code array (int *)
      conversion and the reverse seems to be all that is needed (I think
      simply wcsrtombs() and mbsrtowcs() can be used for that purpose). I'll
      have a closer look later.

      Thanks,
      Ali

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Ameretat Reith
      On Wed, 08 Oct 2014 08:11:34 +0330 ... For ZWNJ, I did a tiny modification telling `arabic_shape` in one of it s invocations, to separate letters based on
      Message 46 of 46 , Oct 12, 2014
      • 0 Attachment
        On Wed, 08 Oct 2014 08:11:34 +0330
        Ali Gholami Rudi <ali.gholami.rudi@...> wrote:

        > I tested it and it is working wonderfully. The only issue is
        > ZWNJ (unicode 0x200c) and ZWJ (unicode 0x200d); I wonder if
        > the letters before and after these characters can be shaped
        > properly...

        For ZWNJ, I did a tiny modification telling `arabic_shape` in one of
        it's invocations, to separate letters based on previously entered ZWNJ
        character. ZWJ could be treated similarly but I doubt with current
        provided letters which are limited to Arabic and Farsi, there could be a
        use case for ZWJ.

        You can apply `zwnj.0.patch` on a recent vim tarball or `zwnj.1.patch`
        on top of your patch.

        --
        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/d/optout.
      Your message has been successfully submitted and would be delivered to recipients shortly.