# is-unicode-supported

> Detect whether the terminal supports Unicode

Latest version **2.1.0** (published 2024-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-unicode-supported
pnpm add is-unicode-supported
yarn add is-unicode-supported
bun add is-unicode-supported
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2024-09-09 |
| First published | 2021-03-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=18 |
| Dependencies | 0 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 86 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | terminal, unicode, detect, utf8, console, shell, support, supports, supported, check, detection |

## Links

- npm: https://www.npmjs.com/package/is-unicode-supported
- Repository: https://github.com/sindresorhus/is-unicode-supported
- Homepage: https://github.com/sindresorhus/is-unicode-supported#readme
- Issues: https://github.com/sindresorhus/is-unicode-supported/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/is-unicode-supported

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2024-09-09
- 2.0.0 — 2023-10-29
- 1.3.0 — 2022-09-08
- 1.2.0 — 2022-03-23
- 1.1.0 — 2021-07-03
- 1.0.0 — 2021-04-18
- 0.1.0 — 2021-03-17

## README

# is-unicode-supported

> Detect whether the terminal supports Unicode

This can be useful to decide whether to use Unicode characters or fallback ASCII characters in command-line output.

Note that the check is quite naive. It just assumes all non-Windows terminals support Unicode and hard-codes which Windows terminals that do support Unicode. However, I have been using this logic in some popular packages for years without problems.

## Install

```sh
npm install is-unicode-supported
```

## Usage

```js
import isUnicodeSupported from 'is-unicode-supported';

isUnicodeSupported();
//=> true
```

## API

### isUnicodeSupported()

Returns a `boolean` for whether the terminal supports Unicode.

## Related

- [is-interactive](https://github.com/sindresorhus/is-interactive) - Check if stdout or stderr is interactive
- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color
- [figures](https://github.com/sindresorhus/figures) - Unicode symbols with Windows fallbacks
- [log-symbols](https://github.com/sindresorhus/log-symbols) - Colored symbols for various log levels

---
_Source: https://npm.io/package/is-unicode-supported · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
