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.1

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

Built distribution (wheel)

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

Total release size: 9.6 kB

Release files / xml_encoding_detector-0.1.1.tar.gz

Download URL xml_encoding_detector-0.1.1.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f848904ef73a898fd3ceda7110a6843128b605826633e11c00be6341c0f2bf06
BLAKE2b-256 checksum
How to use checksums
ed104f494fe052d92dc352294d6274252ad26f919cbd4f00a71944a6f9588b20
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.1-py3-none-any.whl

Download URL xml_encoding_detector-0.1.1-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0395897b538665588dd3e84f89f19b65f55ae9619ee9175936c363f850847056
BLAKE2b-256 checksum
How to use checksums
a326c0517fc173113305cacc80fee7d7b993d1be06e6a122e0c5ca0a54369cf1
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.1

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.1.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