-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
UTF8 doesn't work with text styles #2681
Comments
What output do you get? |
Probably the same as #1794. Note that not all versions of windows console support ANSI escape sequences. If this is a different issue please provide more details. |
Sorry but I'm afraid it's not the same issue. To be clear, utf8 characters and text styles works fine individually, but they just cannot be combined.
|
* Fix #2681 - Make detail::print handle UTF-8 * Okay, let's do this Windows-only * drop extra \0 * yay we can throw!
I'm using vs2022 and have set
/utf-8
option.Thr example code
fmt::print( "┌{0:─^{2}}┐\n" "│{1: ^{2}}│\n" "└{0:─^{2}}┘\n", "", "Hello, world!", 20);
works fine.
But when I try to add some text style,
fmt::print(fmt::fg(fmt::color::red), "┌{0:─^{2}}┐\n" "│{1: ^{2}}│\n" "└{0:─^{2}}┘\n", "", "Hello, world!", 20);
the output get garbled.
The text was updated successfully, but these errors were encountered: