https://github.com/zkat/supports-unicode
Detects whether a terminal supports unicode.
https://github.com/zkat/supports-unicode
Last synced: 8 months ago
JSON representation
Detects whether a terminal supports unicode.
- Host: GitHub
- URL: https://github.com/zkat/supports-unicode
- Owner: zkat
- License: other
- Created: 2021-09-11T08:06:31.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-04T03:00:40.000Z (almost 2 years ago)
- Last Synced: 2025-03-28T07:41:44.490Z (9 months ago)
- Language: Rust
- Size: 32.2 KB
- Stars: 13
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Detects whether a terminal supports unicode.
This crate is a Rust port mashing together
[@sindresorhus](https://github.com/sindresorhus)'
[`is-unicode-supported`](https://npm.im/is-unicode-supported) and
[@iarna](https://github.com/iarna)'s
[`has-unicode`](https://npm.im/has-unicode) NPM packages.
## Example
```rust
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.