Skip to main content

xml-encoding-detector

Lightweight XML encoding detector for Python.

Features

UTF-8 BOM detection

UTF-16 LE/BE BOM detection

UTF-32 LE/BE BOM detection

XML declaration parsing

Encoding alias normalization

Installation

pip install xml-encoding-detector

Usage

from xml_encoding_detector import (

detect_encoding,

)

xml = (

b'<?xml version="1.0" '

b'encoding="Shift_JIS"?>'

)

result = detect_encoding(xml)

print(result.encoding)

print(result.confidence)

print(result.source)

Example Output

shift_jis

0.9

xml-declaration

Metadata

Release files for xml-encoding-detector 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xml-encoding-detector 0.3.0
File Size Uploaded Provenance Actions
xml_encoding_detector-0.3.0.tar.gz 6.1 kB With provenance Details for xml_encoding_detector-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xml-encoding-detector 0.3.0
File Interpreter ABI Platform Actions
xml_encoding_detector-0.3.0-py3-none-any.whl Python 3 none any Details for xml_encoding_detector-0.3.0-py3-none-any.whl

Total release size: 11.6 kB

Release files / xml_encoding_detector-0.3.0.tar.gz

Download URL xml_encoding_detector-0.3.0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b4df3e01ff25af087ad470cd7262e95a999f6262084875c40b20b1a7d26719bc
BLAKE2b-256 checksum
How to use checksums
97a589e5019ac83e01b6b6e5b771884feabda1e94a8203961b5eb8e72723a269
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / xml_encoding_detector-0.3.0-py3-none-any.whl

Download URL xml_encoding_detector-0.3.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
367ab653c5177af365f3d500839196f5fd2ab12b37a440499813439ea54361ba
BLAKE2b-256 checksum
How to use checksums
6c166308623e65cbcbecb7f95068f2ff3cd714913b892985a986f98d8daebcc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for xml-encoding-detector 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for xml_encoding_detector-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page