# 使用 Homebrew, apk, apt, dnf, MacPorts, pacman, zypper, winget 安装 uchardet

查看 uchardet 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:uchardet
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install uchardet
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install uchardet
```

  证据: MacPorts ports tree: textproc/uchardet/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add uchardet
```

  证据: Alpine Linux edge package indexes: uchardet from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install uchardet
```

  证据: Debian stable package indexes: uchardet from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install uchardet
```

  证据: Fedora Rawhide package metadata: uchardet from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- pacman (92%):

```sh
sudo pacman -S uchardet
```

  证据: Arch Linux sync databases: uchardet from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install uchardet
```

  证据: openSUSE Tumbleweed package metadata: uchardet from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- winget (92%):

```sh
winget install --id PolarGoose.uchardet -e
```

  证据: Windows Package Manager source index: PolarGoose.uchardet from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:uchardet
- **软件包管理器:** Homebrew
- **版本:** 0.0.8
- **来源摘要:** Encoding detector library
- **主页:** <https://www.freedesktop.org/wiki/Software/uchardet/>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- uchardet (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.0.8
## 项目历史与用法

uchardet is a character encoding detector library and CLI derived from Mozilla's universal charset detector work. It takes unknown bytes and attempts to identify the text encoding, returning iconv-compatible names, which makes it useful in editors, import pipelines, file tools, and packaging workflows that handle legacy text.

### 项目历史

The freedesktop.org project page says uchardet started as a C language binding of Mozilla's original C++ universal charset detection library. The current README broadens that description to an encoding and language detector that now detects more charsets and more reliably than the original implementation while remaining reasonably fast.

The project moved from BYVoid's earlier GitHub repository to freedesktop hosting. The old repository now tells users that uchardet is a freedesktop project and points to the freedesktop page, bug tracker, releases, and code location.

freedesktop.org lists uchardet 0.0.8 as the last release on 2022-12-08, with earlier release tarballs for 0.0.6 in 2016 and 0.0.7 in 2020. The current project page links GitLab issues for bugs and patches and the GitLab repository for development code.

### 采用历史

uchardet is adopted wherever package users need an embeddable encoding detector rather than a full application. The batch input shows packages for Homebrew, Alpine, Debian, Ubuntu, Fedora, Arch, MacPorts, winget, and openSUSE-style systems, often split as library/development packages on Linux.

Its niche persists because encoding detection remains a practical problem for command-line text processing and data import. A small C/C++ library with iconv-compatible output is easy for downstream language bindings, desktop tools, and scripts to depend on.

### 使用方式

As a library, uchardet is used by passing bytes with no extra encoding information and receiving a likely encoding name, plus language detection in the current README. As a package, the uchardet executable gives shell users a direct way to inspect files before conversion or ingestion.

The supported-encodings list on freedesktop.org covers Unicode encodings plus many regional legacy encodings for Arabic, Chinese, Japanese, Korean, Cyrillic, Central European, Western European, Thai, Turkish, Vietnamese, and other text families.

### 为什么软件包爱好者会关心

uchardet is package-nerd significant because it is infrastructure: it rarely sits at the center of a user's workflow, but it helps many tools make better guesses about old or mislabeled text.

Its history also shows a common open-source maintenance path: a useful standalone project migrates from a personal GitHub repository to freedesktop infrastructure, gains release tarballs and issue tracking there, and remains widely packaged as both a command and a development library.

### 时间线

- 2015: The old BYVoid GitHub repository lists version 0.0.5 as its latest release before the freedesktop move.
- 2016: freedesktop.org publishes uchardet 0.0.6 release tarballs.
- 2020: freedesktop.org publishes uchardet 0.0.7 release tarballs.
- 2022: freedesktop.org publishes uchardet 0.0.8 and lists it as the last release.

### Related projects

- Mozilla's universal charset detector is the direct upstream lineage named by the project.
- iconv/libiconv is the compatibility target for returned encoding names.
- Language bindings and downstream packages use uchardet as a small encoding-detection dependency.

### 来源

- <https://cgit.freedesktop.org/uchardet/uchardet/plain/README.md describes uchardet as an encoding and language detector and notes improved charset reliability versus the original implementation.>
- <https://github.com/BYVoid/uchardet documents the move to freedesktop hosting.>
- <https://www.freedesktop.org/software/uchardet/releases/ lists official 0.0.6, 0.0.7, and 0.0.8 release tarballs and dates.>
- <https://www.freedesktop.org/wiki/Software/uchardet/ describes the project, Mozilla-derived history, iconv-compatible output, supported encodings, bug tracker, repository, and 0.0.8 release.>
- source_facts.package-manager identifies broad package-manager availability.


## 安全说明

library-like package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- library-like package without higher-risk signals

## 其他软件包管理器记录

- Debian apt - libuchardet-dev - 0.0.8-1+b2: normalized package name match | Debian stable package indexes: libuchardet-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | universal charset detection library - development files | https://www.freedesktop.org/wiki/Software/uchardet/
- Debian apt - libuchardet0 - 0.0.8-1+b2: normalized package name match | Debian stable package indexes: libuchardet0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | universal charset detection library - shared library | https://www.freedesktop.org/wiki/Software/uchardet/
- Debian apt - uchardet - 0.0.8-1+b2: normalized package name match | Debian stable package indexes: uchardet from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | universal charset detection library - cli utility | https://www.freedesktop.org/wiki/Software/uchardet/
- Ubuntu apt - libuchardet-dev - 0.0.8-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libuchardet-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | universal charset detection library - development files | https://www.freedesktop.org/wiki/Software/uchardet/
- Ubuntu apt - libuchardet0 - 0.0.8-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libuchardet0 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | universal charset detection library - shared library | https://www.freedesktop.org/wiki/Software/uchardet/
- Ubuntu apt - uchardet - 0.0.8-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: uchardet from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | universal charset detection library - cli utility | https://www.freedesktop.org/wiki/Software/uchardet/
- apk - uchardet - 0.0.8-r2: normalized package name match | Alpine Linux edge package indexes: uchardet from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Encoding detector library ported from Mozilla | https://www.freedesktop.org/wiki/Software/uchardet
- apk - uchardet-dev - 0.0.8-r2: normalized package name match | Alpine Linux edge package indexes: uchardet-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Encoding detector library ported from Mozilla (development files) | https://www.freedesktop.org/wiki/Software/uchardet
- apk - uchardet-doc - 0.0.8-r2: normalized package name match | Alpine Linux edge package indexes: uchardet-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Encoding detector library ported from Mozilla (documentation) | https://www.freedesktop.org/wiki/Software/uchardet
- apk - uchardet-libs - 0.0.8-r2: normalized package name match | Alpine Linux edge package indexes: uchardet-libs from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Encoding detector library ported from Mozilla (libraries) | https://www.freedesktop.org/wiki/Software/uchardet
- apk - uchardet-static - 0.0.8-r2: normalized package name match | Alpine Linux edge package indexes: uchardet-static from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Encoding detector library ported from Mozilla (static library) | https://www.freedesktop.org/wiki/Software/uchardet
- dnf - uchardet - 0.0.8-11.fc45: normalized package name match | Fedora Rawhide package metadata: uchardet from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | An encoding detector library ported from Mozilla | https://www.freedesktop.org/wiki/Software/uchardet
- dnf - uchardet-devel - 0.0.8-11.fc45: normalized package name match | Fedora Rawhide package metadata: uchardet-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development files for uchardet | https://www.freedesktop.org/wiki/Software/uchardet
- pacman - uchardet - 0.0.8-4: normalized package name match | Arch Linux sync databases: uchardet from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Encoding detector library ported from Mozilla | https://www.freedesktop.org/wiki/Software/uchardet
- zypper - libuchardet-devel - 0.0.8-2.5: normalized package name match | openSUSE Tumbleweed package metadata: libuchardet-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Universal Charset Detection Library | https://www.freedesktop.org/wiki/Software/uchardet/
- zypper - libuchardet0 - 0.0.8-2.5: normalized package name match | openSUSE Tumbleweed package metadata: libuchardet0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Universal Charset Detection Library | https://www.freedesktop.org/wiki/Software/uchardet/


## Combined YAML source

View the package source record on GitHub. [combined/uchardet.yml](https://github.com/mxcl/pkgdb/blob/main/combined/uchardet.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
