As some people may not be accustomed to TTB-RTL text in mainland China, or LTR-TTB text in other regions, it may be convient to Text Reflow from one way to another. E.g.
image
By text reflowing it does not only mean to arrange text elements, which may be easily done by many other softwares, but to re-arrange text in scanned images.
It may be solved like this. Just rotate every square character detected 90 degree clockwise/counter-clockwise, and leave other characters be.