Text Direction Problem
GNOME Terminal seems to be following the document algorithm for determining RTL and LTR text ordering, but this has some strange results.
I am processing large volumes of data in CSV files and I find that when I output lines with Unicode RTL characters, (without setting an explicit direction) GNOME terminal will swap two fields.
Steps to Reproduce:
printf "\u062c\u0644\u0627\u0644\u200c\u0627\u0644\u062f\u06cc\u0646,1,x\n" printf "\u062c\u0644\u0627\u0644\u200c\u0627\u0644\u062f\u06cc\u0646,x,1\n"
First line prints fields 1 and 2 switched. Second line is OK.
Keep the field order of the original CSV output.
This behavior, changing the order of the fields, does not happen in rxvt-unicode, which I believe is considered the reference implementation of the X-window terminal.
I've been told that this isn't a bug (by a Linux distribution maintainer) because it is following the Unicode algorithm, and maybe that's true, but I'd like to make the case that the Unicode ordering guidelines were intended for documents, an not for lines and that Unix terminals should be line-oriented processors first, and only document-oriented when explicitly directed by applications.