Hebrew in TextArea not rendered correctly on Windows

  1. 4 months ago

    Gert V

    Oct 3 Leuven, Belgium

    Hi All,

    I made a Windows application for people to select errors in plain text.
    They highlight the error and place tags around it by pressing on a button.
    For Hebrew, the text rendered is not correct if there are non-Hebrew characters in the sentence. The order of Hebrew strings and non-Hebrew strings is messed up.

    How can I force the text to be read RTL (because this is where I think the problem comes from)?


  2. Gert V

    Oct 4 Leuven, Belgium


    the same dataset does not seem to cause a problem in a tool written in C#. I hope I should not redevelop this tool in C#.
    For sure I'm not the first one who bumps into this; I guess Arabic and Farsi would suffer the same rendering issue.
    Others reported the same issue on the forum. But I haven't found the solution yet. I hope someone has a solution...


  3. Gert V

    Oct 9 Leuven, Belgium

    Hi all, I'm still struggling with this. Does anyone have a solution? -- thanks

  4. Louis D

    Oct 9 Pre-Release Testers, Xojo Pro Montreal, QC, Canada

    Have you defined the text encoding? Non-Hebrew strings may well be ASCII (single byte) while Hebrew strings probably need to be UTF-8 (double byte). The problem occurs when the system does not expect to manage UTF-8 text. Define all strings as UTF-8 before assembling them and there is a good chance that all will be just fine. I am assuming that you have control over the source strings individually. If not, try to define the encoding as soon as you read the string from the source. If that does not work, you will have to resort to more elaborate techniques that I can't think of right now.

    I am not familiar with Hebrew, so perhaps yet another encoding spec is required. Xojo provides several that you could try if UTF-8 does not work.

  5. Gert V

    Oct 9 Leuven, Belgium

    Hi Louis, thanks for replying. Yes the source is UTF-8. If I render the text as HTML (with the right attributed for language and writing direction) the rendering is correct, even the BIDI texts. I did not test in the other Xojo UI elements but in the TextArea I don't get it right. I don't see how to define the writing direction even. I can set the alignment of course but that's not a solution.
    I have the impression XOJO handles UTF-8 strings with BIDI writing correctly, but the TextArea does not show it correctly. At least not on Windows. I don't know on Mac.

  6. Gert V

    Oct 10 Leuven, Belgium

    Maybe someone knows a plugin to handle RTL and BIDI texts correctly. Anyone? Please?

  7. Beatrix W

    Oct 10 Pre-Release Testers Europe (Germany)

    I've had troubles with Hebrew text on the Mac a while ago. I don't think the text was utf8 encoding though. Have you tried the new framework?

  8. Gert V

    Oct 10 Leuven, Belgium

    which framework?

  9. Beatrix W

    Oct 10 Pre-Release Testers Europe (Germany)

    Sorry, my bad, didn't read enough. You don't have internal text. The new framework won't help you there.

or Sign Up to reply!