If I understand correctly, your text "starts" with a number, followed by a hyphen and text. Notepad and other editors allow you to choose the "direction of writing." If you select from right to left, you will get the same result as your screenshot,

If you want to keep the recording direction left-right, you can explicitly set it
ubidi_setPara(para, "1002 -ابو ماجد الانصاري", 25, UBIDI_LTR, NULL, pErrorCode);
or you can insert the line UNICODE U + 202A ( LEFT-TO-RIGHT EMBEDDING ) into the line, which will apply this direction. If your code is in C ++, you can write something like
icu::UnicodeString string_to_layout = "\x202a"; string_to_layout += "1002 -ابو ماجد الانصاري";
and you cannot use string_to_layout as an input parameter for renderParagraph() (see http://icu-project.org/apiref/icu4c-latest/ubidi_8h.htm ).
source share