-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ANSI escape breaks right to left Strings #97020
Comments
I don't think this has anything to do with rust. Rust doesn't interpret the ANSI escape sequence. It simply puts the string to stdout as-is. It is the terminal that interprets these sequence. This issue should be opened to the terminal implementer (in this particular case for "x86_64-pc-windows-msvc", it is cmd or powershell or whichever terminal you are using) |
You're right, after some more testing it happens from other sources too Sadly both cmd and Powershell have this behavior (inside Windows Terminal) @wwylele out of curiosity, if you try the code above in bash does it work correctly? |
If you are interested, I would also recommend commenting on microsoft/terminal#538 about how ANSI codes interfere with the bidi algorithm. |
Thanks, I just left a short comment there |
I tried this code:
I expected to see this happen:
Instead, this happened:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: