6 stable releases

3.0.0 Feb 4, 2024
2.1.0 Jan 19, 2024
2.0.0 Mar 14, 2023
1.0.2 Sep 27, 2021
1.0.1 Sep 11, 2021

#61 in Command-line interface

Download history 203531/week @ 2025-08-01 186513/week @ 2025-08-08 195501/week @ 2025-08-15 178616/week @ 2025-08-22 205955/week @ 2025-08-29 195251/week @ 2025-09-05 208530/week @ 2025-09-12 226945/week @ 2025-09-19 213899/week @ 2025-09-26 206480/week @ 2025-10-03 209236/week @ 2025-10-10 214219/week @ 2025-10-17 225191/week @ 2025-10-24 227984/week @ 2025-10-31 233910/week @ 2025-11-07 187619/week @ 2025-11-14

910,865 downloads per month
Used in 259 crates (23 directly)

Apache-2.0

8KB

Detects whether a terminal supports unicode.

This crate is a Rust port mashing together @sindresorhus' is-unicode-supported and @iarna's has-unicode NPM packages.

Example

use supports_unicode::Stream;

if supports_unicode::on(Stream::Stdout) {
    println!("stdout supports unicode output");
} else {
    println!("no unicode, please");
}

MSRV

This crate requires rustc 1.70.0 or later.

No runtime deps