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.1.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.1.0
File Size Uploaded Provenance Actions
xml_encoding_detector-0.1.0.tar.gz 4.0 kB With provenance Details for xml_encoding_detector-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 7.8 kB

Release files / xml_encoding_detector-0.1.0.tar.gz

Download URL xml_encoding_detector-0.1.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c2061f983d1771eed0e147ba053ba8b3ed129880c8f55bf5b19863dceda56e91
BLAKE2b-256 checksum
How to use checksums
800b0a1b6060a1246fa391e26d1006418fbb341be0a81618eb20c12b842fe476
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.1.0-py3-none-any.whl

Download URL xml_encoding_detector-0.1.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1fbc448a4775bb53f9d92113fa43dd3d89588b6cc24d3d379c6c80e223b51e23
BLAKE2b-256 checksum
How to use checksums
2e961c1efa1c954bac4b25bfc81269fa6f3462ddf705b49bc9391c0c269a7549
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.1.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.1.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