There seems to be an issue in the Bidirectional Text Algorithm (BiDi) Implementation on Cursor (Sonnet 3.5 & gpt-4o)
- The IDE appears to be incorrectly implementing Unicode Bidirectional Algorithm (UAX #9)
- Code segments marked as
LTR
(Left-to-Right) are breaking the natural flow ofRTL
(Right-to-Left) Arabic text - Need proper handling of directional isolates (LRI, RLI, FSI) and pop directional isolate (PDI) markers
I tested the same in ChatGPT using GPT-4o, o1 and o1-pro (from chatgpt.com), and they handle this perfectly: