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.2.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.2.0
File Size Uploaded Provenance Actions
xml_encoding_detector-0.2.0.tar.gz 5.5 kB With provenance Details for xml_encoding_detector-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 10.5 kB

Release files / xml_encoding_detector-0.2.0.tar.gz

Download URL xml_encoding_detector-0.2.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
dbbe74cb18511eac207a5972e0a670fb0d6c2f6de0df77950963382db7433fbf
BLAKE2b-256 checksum
How to use checksums
b452a0ef96606c96e67fd7a3e5886e5abc336062103c7204d8bfcbc527eeebf2
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.2.0-py3-none-any.whl

Download URL xml_encoding_detector-0.2.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
810ed0cdb3ea5c876f3bdc39a749d2005a6a300ee15d3124ff481b942e778fc9
BLAKE2b-256 checksum
How to use checksums
21866f9782364c8a919601a4abf25171f6b8b73eb084118324fbf0ed082b8141
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.2.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.2.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