Search code examples
c#unicodebidi

Unicode bidi text algorithm in C#?


Is there a C# version of the Unicode algorithm that takes a Unicode string and breaks it into runs that can be correctly rendered? Each run should be either left-to-right or right-to-left.

We understand this is part of the Java ICU4J, but that is a large library, and we're only looking for this specific functionality, to render text correctly.


Solution

  • This is the unicode standard for bidi handling:

    UNICODE BIDIRECTIONAL ALGORITHM

    Also try: this

    Implementations:

    1. JAVA
    2. C++

    I'm sure you will be able to convert them to c# fairly simply