1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
[]
= "charcode"
= "0.1.5"
= "2024"
= "1.88"
= "MIT"
= "Character encoding conversion implementing the WHATWG Encoding Standard, with no external dependencies."
= "https://github.com/KarpelesLab/charcode"
= "https://docs.rs/charcode"
= "README.md"
= ["encoding", "charset", "utf-8", "unicode", "conversion"]
= ["encoding", "text-processing", "no-std"]
= ["/tools", "/.github"]
[]
= { = "1", = true, = false }
[]
= "1"
[]
= ["std", "whatwg"]
# --- capabilities -----------------------------------------------------------
# Implements `std::error::Error` for the error types. Implies `alloc`.
= ["alloc"]
# The conveniences that hand back an owned `String`, `Vec` or `Cow`. Turning it
# off leaves the streaming API, which converts into caller-provided buffers and
# never allocates.
= []
# An encoding serializes as its name. Needs neither `std` nor `alloc`.
= ["dep:serde"]
# The `charcode` command-line tool, an iconv-style converter (gates the binary
# target below). It adds no dependencies.
# The tool supports //TRANSLIT, so it takes that table; the library does not.
= ["std", "whatwg", "translit"]
# --- the WHATWG Encoding Standard -------------------------------------------
# Everything the standard defines: all 40 encodings and all 228 of their labels.
= [
"whatwg-aliases",
"single-byte",
"big5",
"euc-jp",
"euc-kr",
"gb18030",
"iso-2022-jp",
"shift-jis",
]
# `Encoding::for_whatwg_label`, the standard's `get an encoding`, which answers
# only with encodings the standard defines however many of the extra groups
# below are compiled in. Independent of which tables you take, so a build that
# needs only Japanese and Unicode can pair this with `shift-jis`, `euc-jp` and
# `iso-2022-jp`.
= []
# --- table groups -----------------------------------------------------------
# UTF-8, UTF-16BE/LE, replacement and x-user-defined are always present: they
# need no tables, and the first three are what byte order mark sniffing
# resolves to.
#
# The standard's 28 legacy single-byte encodings, about 22 KiB of tables.
= ["half-byte"]
# Two internal features, enabled automatically by the groups that need them.
# Neither is meant to be selected directly.
#
# The decoder for an encoding whose bytes below 0x80 are plain ASCII, so only
# the 128 above need a table.
= []
# The decoder for one whose whole byte range needs a table, such as EBCDIC.
= []
# The legacy multi-byte encodings, one feature each because their tables are
# the large ones.
= [] # ~170 KiB
= [] # ~70 KiB, shares the JIS tables with the two below
= [] # ~115 KiB
= [] # ~145 KiB, also provides GBK
= [] # ~55 KiB
# Reuses the EUC-KR table, so it needs that group. The standard refuses this
# encoding outright; `for_whatwg_label` still answers `replacement` for it.
= ["euc-kr"]
# Brings its own CNS 11643 planes 1 and 2, about 90 KiB, and takes GB 2312 from
# the gb18030 group. Refused by the standard in the same way.
= ["gb18030"] # ~90 KiB
# RFC 1554, which designates six sets: it needs the tables of all of them, and
# brings none of its own.
= ["euc-jp", "euc-kr", "gb18030", "single-byte"]
# UTS #6, which is a compression scheme rather than a charset. No tables: its
# eight windows move over Unicode instead.
= []
= [] # ~55 KiB
# --- charsets outside the standard ------------------------------------------
# All off by default. Their labels never collide with one the standard defines,
# so enabling them cannot change what an existing lookup resolves to.
#
# Everything below at once.
= ["dos", "ebcdic", "mac", "misc", "unicode-extras"]
# IBM PC / OEM code pages: 437, 737, 775, 850, 852, 855, 856, 857, 860-865, 869,
# 1006. About 13 KiB.
= ["full-byte", "half-byte"]
# IBM mainframe EBCDIC: 037, 424, 500, 875, 1026. About 6 KiB.
= ["full-byte"]
# Apple's regional variants of Mac OS Roman: Arabic, Celtic, Central European,
# Croatian, Farsi, Gaelic, Greek, Icelandic, Romanian, Turkish. About 8 KiB.
= ["half-byte"]
# Atari ST and KZ-1048. About 2 KiB.
= ["half-byte"]
# Best-effort ASCII transliteration for the encoders: `EncodeOptions::transliterate`.
# About 30 KiB of table, derived from Unicode's decompositions.
= []
# UTF-32BE/LE and UTF-7. No tables at all; these are algorithmic. The standard
# leaves UTF-7 out deliberately, and `Encoding::for_whatwg_label` will not return
# it however this is set.
= []
[[]]
= "charcode"
= "src/bin/charcode/main.rs"
= ["cli"]
# A plain `fn main()` rather than a harness, so benchmarking needs no dependency.
[[]]
= "throughput"
= false
= ["whatwg"]
[]
= true
[]
= 3