Re: Unicode text Direction Detection
- From: Behdad Esfahbod <behdad cs toronto edu>
- To: Gaurav Jain <gaurav anywhere gmail com>
- Cc: gtk-app-devel-list gnome org, Matthias Clasen <mclasen redhat com>, gtk-i18n-list gnome org
- Subject: Re: Unicode text Direction Detection
- Date: Wed, 17 Aug 2005 09:29:46 -0400 (EDT)
On Wed, 17 Aug 2005, Gaurav Jain wrote:
> Could you give me some tips on how to go about implementing a "naive"
> version of such an algorithm? Suppose I have a unicode character,
> what's the simplest way to know if it is a LTR directional character
> or a RTL directional character?
Here it is, using what's available in Glib:
- If it's U+200E, LTR.
- If it's U+200F, LTR.
- If it's NOT of general category G_UNICODE_*_LETTER, ignore it.
- If it's in the range U+0590..U+08FF, RTL.
- Otherwise, LTR.
--behdad
http://behdad.org/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]