Ein Unicode-Codepunkt-Dump.
Denke es dir als hexdump(1) für Unicode. Der Befehl analysiert die Eingabe und gibt dann drei Spalten aus: die direkte Byte-Position des ersten Codepunkts in dieser Zeile, Codepunkte in ihrer Hex-Schreibweise und schließlich die rohen Eingabezeichen, wobei Kontrollzeichen und Leerzeichen durch einen Punkt ersetzt wurden.
Ungültige Byte-Sequenzen werden mit einem „X“ dargestellt und mit dem Hex-Wert in Fragezeichen eingeschlossen, z. B., „?F5?“.
Du kannst Daten von stdin einleiten, mehrere Dateien auf einmal auswählen oder sogar alle diese Eingabemethoden durcheinander verwenden.
Beispiele:
Basic usage with stdin:
echo -n 'ABCDEFGHIJKLMNOP' | unidump -n 4 0 0041 0042 0043 0044 ABCD 4 0045 0046 0047 0048 EFGH 8 0049 004A 004B 004C IJKL 12 004D 004E 004F 0050 MNOPDump the code points translated from another encoding:
unidump -c latin-1 some-legacy-fileDump many files at the same time:
unidump foo-*.txtControl characters and whitespace are safely rendered:
echo -n -e '\x01' | unidump -n 1 0 0001 .Finally learn what your favorite Emoji is composed of:
( echo -n -e '\xf0\x9f\xa7\x9d\xf0\x9f\x8f\xbd\xe2' ; \ echo -n -e '\x80\x8d\xe2\x99\x82\xef\xb8\x8f' ; ) | \ unidump -n 5 0 1F9DD 1F3FD 200D 2642 FE0F .🏽.♂️See <https://emojipedia.org/man-elf-medium-skin-tone/> for images. The “elf” emoji (the first character) is replaced with a dot here, because the current version of Python’s unicodedata doesn’t know of this character yet.
Use it like strings(1):
unidump -e '{data}' some-file.binDas ersetzt jedes unbekannte Byte aus der Eingabedatei mit „X“ und jedes Kontroll- und Leerzeichen mit „.“.
Only print the code points of the input:
unidump -e '{repr}'$'\n' -n 1 some-file.txtDas Ergebnis ist eine Folge von Codepunkten in Hex-Notation, jeder auf einer eigenen Zeile, ohne Byte-Zähler oder Darstellung der tatsächlichen Daten. Du kannst das verwenden, um die Gesamtzahl an Zeichen (nicht rohe Bytes) in einer Datei zu bestimmen, indem du es durch wc -l pipest.
Das ist version 1.1.4 von unidump mit Unicode-13.0.0-Daten.
Metadata
Release files for unidump 1.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| unidump-1.1.4.tar.gz | 10.3 kB | Without provenance | Details for unidump-1.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| unidump-1.1.4-py3-none-any.whl | Python 3 | none | any | Details for unidump-1.1.4-py3-none-any.whl |
Total release size: 22.1 kB
Release files / unidump-1.1.4.tar.gz
| Download URL | unidump-1.1.4.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be39ba0beff5b50cab11f5ce5de9c03c3a4f5437755f2d93e9a176f5c30586b3
|
|
BLAKE2b-256 checksum How to use checksums |
58c1e5ad58903d895c62206f7a625ee3c1ccd4fe6f70a5b0dd87ed6557e3093b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / unidump-1.1.4-py3-none-any.whl
| Download URL | unidump-1.1.4-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24293269f06cd627255034e0d755526b6d43443eeb104c3c773e50e6b9d8c2cb
|
|
BLAKE2b-256 checksum How to use checksums |
c6a37fdce5d74be37ba232ac0371a77aadc0ebe9e0602914560d38c9fd7b842b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for unidump 1.1.4
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.