Skip to content
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

Colorful and stylized text in the standard output doesn't display as expected #1055

Open
MStoic13 opened this issue Apr 20, 2024 · 0 comments

Comments

@MStoic13
Copy link

I was trying to use the ansi_term crate to color and style the output text but instead I got this in the standard output:
�[33mThis is colored�[0m, �[1mthis is bold�[0m and �[1;33mthis is bold and colored�[0m

I see ansi_term is a crate from the Rust cookbook and Rust Playground does have it cargo.toml
https://rust-lang-nursery.github.io/rust-cookbook/cli/ansi_terminal.html?highlight=color#ansi-terminal

Here is an example in Rust Playground
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=cbbd1a66e3da6ea8e38e1b4d3bc06bb9

Any idea how I can display colored / stylized text in the output?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant