I'm trying to write a texteditor for right-to-left languages. I'm using swing components. The problem appears, whenever a symbol and a Latin character is entered in the right-to-left text, the order of the words is mixed up. The sentences become unreadable. For example:
"<TAG> text < newly added text TAG />"
"newly added text <TAG> text </TAG>"