Re: Unicode text Direction Detection

Thanks Matthias for the quick response.

On 8/17/05, Matthias Clasen <mclasen redhat com> wrote:
> On Wed, 2005-08-17 at 17:32 +0530, Gaurav Jain wrote:
> > Hi,
> >
> > I have a Unicode text, and I need to detect its direction by some BiDi
> > algorithm (i.e., whether it is Left-to-right or Right-to-left).  For
> > example, I need to look for the first "strong" directional character
> > in the text, and find out its direction.  Is there a way I can do that
> > using some GTK/GLib APIs?  Something, perhaps, on the line of the
> > Windows API GetStringTypeW() perhaps?
> >
> > Any help in this regard would be appreciated!
> Not currently available, but we have an open bug which requests to move
> the functionality from gtk to glib and make it public API.

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?

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