GithubHelp home page GithubHelp logo

classicvalues / pecl-internationalization-fribidi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from php/pecl-internationalization-fribidi

2.0 1.0 0.0 72 KB

Implementation of the Unicode BiDi algorithm

Home Page: http://pecl.php.net/package/fribidi

C 59.35% PHP 40.65%

pecl-internationalization-fribidi's Introduction

PECL FriBidi
============

PHP Extension for GNU FriBidi, an implementation of the Unicode Bidirectional Algorithm (bidi)


Purpose
-------

This extension is basically a wrapper for the GNU FriBidi implementation
of the Unicode Bidirectional algorithm. The need for such an algorithm
rises from the bidirectional language usage  done by applications.
Arabic/Hebrew embedded within English is such a case.


Usage
-----

The only function used is fribidi_log2vis (logical [non-reversed] to visual [reversed]).

     Input:
            1) The Logical string.
            2) Base direction of application. Possible values:
                 * FRIBIDI_AUTO  (autodetect the base direction)
                 * FRIBIDI_LTR   (left to right
                 * FRIBIDI_RTL   (right to left)
                 * FRIBIDI_WLTR  (weak left to right)
                 * FRIBIDI_WRTL  (weak right to left)
            3) The char code being used, which can be one of the following constants:
                 * FRIBIDI_CHARSET_UTF8     (Unicode)
                 * FRIBIDI_CHARSET_8859_6   (ISO-8859-6 - Arabic)
                 * FRIBIDI_CHARSET_8859_8   (ISO-8859-8 - Hebrew)
                 * FRIBIDI_CHARSET_CP1255   (MS Codepage 1255 - Hebrew/Yiddish)
                 * FRIBIDI_CHARSET_CP1256   (MS Codepage 1256 - Arabic)
                 * FRIBIDI_CHARSET_CAP_RTL  (Used for test purposes, will treat CAPS as non-English letters)

Note: Currently, GNU FriBidi supports the above Character Codes alone.

      Output: The visual string, on success, false, otherwise.


Compiling
---------

1) Static - ./configure --with-fribidi=base-directory-of-FriBidi-installation-path
             (defaults to /usr/local).

2) dl - same, just add shared, to get .... --with-fribidi=shared,base....


Prerequisites
-------------

1) GNU FriBidi version 0.19.1 or later must be installed.
   Latest version can be obtained thru http://fribidi.org/


Notes
-----

The function fribidi_log2vis computes three more arrays which are currently not passed back as output.
These arrays are:
    1) mapping from the logical to the visual string.
    2) mapping from the visual to the logical string.
    3) embedding level of characters as figured out by the bidi algorithm.

The extension needs further implementation to support this.
p.s. - If you don't understand this, you probably don't need it.

pecl-internationalization-fribidi's People

Contributors

behnam avatar sebastianbergmann avatar zsuraski avatar weltling avatar rlerdorf avatar smalyshev avatar stigsb avatar wez avatar tony2001 avatar edinkad avatar johannes avatar pierrejoye avatar

Stargazers

 avatar Classic Values avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.