Re: GUI with RTL and BiDi support
- Posted by EUWX Dec 15, 2012
- 1524 views
Hi
does anyone know if there is any GUI usable from an Euphoria program that also supports RTL (Right-to-Left) languages and text bidirectionality? I know for sure that Qt and GTK support these features, but are there Euphoria bindings for them? Or, are they planned?
Thanks
I have seen Arabic and Hebrew support at almost any software where there is allowance for European languages. This, I believe, is ANSI (one byte per character) support. You should, therefore, find it easy to integrate your needs with current implementations of euphoria using Ansi.
Euphoria has a 4 bytes/per character and has availability of several Peek/Poke operations with memory. Therefore, you should be able to integrate your needs using 16 bit Unicode and Peek/Poke operations.
As of Unicode 6.1, the Arabic script is contained in the following blocks:
Arabic (0600—06FF, 225 characters) Arabic Supplement (0750—077F, 48 characters) Arabic Extended-A (08A0—08FF, 39 characters) Arabic Presentation Forms-A (FB50—FDFF, 608 characters) Arabic Presentation Forms-B (FE70—FEFF, 140 characters) Rumi Numeral Symbols (10E60—10E7F, 31 characters) Arabic Mathematical Alphabetic Symbols (1EE00—1EEFF, 143 characters)
Hebrew is at Hex 0580
I could not easily find the Persian and Urdu range, but if you look into it you will find the exact 16 bit Unicode character set for these. 16 bit Unicode fully supports bidirectional text, so you would be able to use the Peek/Poke facilities and create 16 bit characters. Your major difficulty will be in using some of the functions that manipulate character strings. Euphoria, as far as I know, has not addressed this area of Unicode work. You will have to create your substitute variants of the one byte routes, converting them to two byte functions. Note that the some Arabic set extensions resides above FFFF, so if you intend to use those as well, you should start with 32 bits per character, which Euphoria is quite capable of.