@dpuse/dpuse-shared 1.0.180 → 1.0.181
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +132 -103
- package/dist/dpuse-shared.es.js +477 -93
- package/dist/dpuse-shared.es.js.map +1 -1
- package/dist/types/src/encoding/index.d.ts +474 -88
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -83,101 +83,130 @@ Character encoding types with detection and decodability flags, a catalogue of e
|
|
|
83
83
|
|
|
84
84
|
<!-- ENCODINGS_START -->
|
|
85
85
|
|
|
86
|
-
The table below lists every encoding [jschardet](https://github.com/aadsm/jschardet) can identify from a file's contents, under the name it reports. A test checks the table against jschardet's own list of encodings, so it fails if a jschardet upgrade adds, drops, renames or remaps one.
|
|
86
|
+
The table below lists every encoding [jschardet](https://github.com/aadsm/jschardet) can identify from a file's contents, under the name it reports, plus those that the browser or [iconv-lite](https://github.com/ashtuchkin/iconv-lite) can decode but jschardet never reports. A test checks the table against jschardet's own list of encodings, so it fails if a jschardet upgrade adds, drops, renames or remaps one.
|
|
87
87
|
|
|
88
|
+
- **Detectable** — jschardet can report it. One that is not can only be chosen by hand. `gbk` is also read by `gb18030`.
|
|
88
89
|
- **Decodable** — the browser's built-in `TextDecoder` can decode it. Those that cannot are refused by all the major browsers: `HZ-GB-2312` and `ISO-2022-KR` are blocked by the WHATWG Encoding Standard for security reasons, and the rest, such as UTF-32, UTF-7 and the DOS, Mac and mainframe code pages, are not part of the standard. A file in one can still be named, even though it cannot be read. `UTF-16` is marked not decodable because its byte-order mark decides which way round it is read, so it has no single browser name.
|
|
89
|
-
- **
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
| Arabic |
|
|
98
|
-
| Arabic |
|
|
99
|
-
| Arabic |
|
|
100
|
-
| Arabic |
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
| Baltic |
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
|
115
|
-
|
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
|
|
|
119
|
-
|
|
|
120
|
-
|
|
|
121
|
-
|
|
|
122
|
-
| Cyrillic |
|
|
123
|
-
| Cyrillic |
|
|
124
|
-
|
|
|
125
|
-
|
|
|
126
|
-
|
|
|
127
|
-
|
|
|
128
|
-
|
|
|
129
|
-
|
|
|
130
|
-
|
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
|
|
|
136
|
-
|
|
|
137
|
-
|
|
|
138
|
-
|
|
|
139
|
-
|
|
|
140
|
-
|
|
|
141
|
-
|
|
|
142
|
-
|
|
|
143
|
-
|
|
|
144
|
-
|
|
|
145
|
-
|
|
|
146
|
-
|
|
|
147
|
-
|
|
|
148
|
-
|
|
|
149
|
-
|
|
|
150
|
-
|
|
|
151
|
-
|
|
|
152
|
-
|
|
|
153
|
-
|
|
|
154
|
-
|
|
|
155
|
-
|
|
|
156
|
-
|
|
|
157
|
-
|
|
|
158
|
-
|
|
|
159
|
-
|
|
|
160
|
-
|
|
|
161
|
-
|
|
|
162
|
-
|
|
|
163
|
-
|
|
|
164
|
-
|
|
|
165
|
-
|
|
|
166
|
-
|
|
|
167
|
-
|
|
|
168
|
-
|
|
|
169
|
-
|
|
|
170
|
-
|
|
|
171
|
-
|
|
|
172
|
-
|
|
|
173
|
-
|
|
|
174
|
-
|
|
|
175
|
-
|
|
|
176
|
-
|
|
|
177
|
-
|
|
|
178
|
-
|
|
|
179
|
-
|
|
|
180
|
-
|
|
|
90
|
+
- **TextDecoder** — the name browsers decode it with, taken from jschardet's own map. Browsers treat some names as aliases, so for example `ascii` and `ISO-8859-1` are decoded as `windows-1252`. The practical effects: bytes 0x80–0x9F decode as Windows-1252 characters (such as `€` and curly quotes) rather than control codes, and `ascii` never rejects bytes above 0x7F.
|
|
91
|
+
- **iconv-lite** — the name iconv-lite decodes it with. Nothing decodes with iconv-lite yet: the column records what it could read, including most DOS and Mac code pages, UTF-7 and UTF-32. A test checks that iconv-lite accepts every name.
|
|
92
|
+
|
|
93
|
+
The major browsers all follow the Encoding Standard, so these columns hold for each of them. A test checks that Node's `TextDecoder`, which follows the same standard, accepts every TextDecoder name as its own. They were also confirmed in Chrome 154, Edge 154, Firefox 156 and Safari 26.6 (October 2026), and all four gave identical results. To re-check them on a Mac, run `npm run check:browsers` after a build.
|
|
94
|
+
|
|
95
|
+
| Group | Encoding | Detectable | Decodable | TextDecoder | iconv-lite |
|
|
96
|
+
| :--------------------- | :--------------- | :--------: | :-------: | :------------- | :-------------- |
|
|
97
|
+
| — | ascii | ✅ | ✅ | windows-1252 | ascii |
|
|
98
|
+
| Arabic | cp720 | ✅ | ❌ | — | cp720 |
|
|
99
|
+
| Arabic | cp864 | ✅ | ❌ | — | cp864 |
|
|
100
|
+
| Arabic | cp1006 | ✅ | ❌ | — | — |
|
|
101
|
+
| Arabic | cp1046 | ❌ | ❌ | — | cp1046 |
|
|
102
|
+
| Arabic | iso-8859-6 | ✅ | ✅ | iso-8859-6 | iso88596 |
|
|
103
|
+
| Arabic | windows-1256 | ✅ | ✅ | windows-1256 | windows1256 |
|
|
104
|
+
| Armenian | armscii-8 | ❌ | ❌ | — | armscii8 |
|
|
105
|
+
| Baltic | cp775 | ✅ | ❌ | — | cp775 |
|
|
106
|
+
| Baltic | cp922 | ❌ | ❌ | — | cp922 |
|
|
107
|
+
| Baltic | iso-8859-13 | ✅ | ✅ | iso-8859-13 | iso885913 |
|
|
108
|
+
| Baltic | iso8859-4 | ✅ | ✅ | iso-8859-4 | iso88594 |
|
|
109
|
+
| Baltic | windows-1257 | ✅ | ✅ | windows-1257 | windows1257 |
|
|
110
|
+
| Celtic | iso8859-14 | ✅ | ✅ | iso-8859-14 | iso885914 |
|
|
111
|
+
| Central European | cp852 | ✅ | ❌ | — | cp852 |
|
|
112
|
+
| Central European | iso-8859-2 | ✅ | ✅ | iso-8859-2 | iso88592 |
|
|
113
|
+
| Central European | maccroatian | ❌ | ❌ | — | maccroatian |
|
|
114
|
+
| Central European | maclatin2 | ✅ | ❌ | — | maccenteuro |
|
|
115
|
+
| Central European | windows-1250 | ✅ | ✅ | windows-1250 | windows1250 |
|
|
116
|
+
| Chinese Simplified | cp936 | ❌ | ❌ | — | cp936 |
|
|
117
|
+
| Chinese Simplified | gb18030 | ✅ | ✅ | gb18030 | gb18030 |
|
|
118
|
+
| Chinese Simplified | gbk | ❌ | ✅ | gbk | gbk |
|
|
119
|
+
| Chinese Simplified | hz-gb-2312 | ✅ | ❌ | — | — |
|
|
120
|
+
| Chinese Simplified | iso646-cn | ❌ | ❌ | — | iso646cn |
|
|
121
|
+
| Chinese Traditional | big5 | ✅ | ✅ | big5 | big5hkscs |
|
|
122
|
+
| Chinese Traditional | cp950 | ❌ | ❌ | — | cp950 |
|
|
123
|
+
| Cyrillic | cp808 | ❌ | ❌ | — | cp808 |
|
|
124
|
+
| Cyrillic | cp1124 | ❌ | ❌ | — | cp1124 |
|
|
125
|
+
| Cyrillic | cp1125 | ✅ | ❌ | — | cp1125 |
|
|
126
|
+
| Cyrillic | ibm855 | ✅ | ❌ | — | cp855 |
|
|
127
|
+
| Cyrillic | ibm866 | ✅ | ✅ | ibm866 | cp866 |
|
|
128
|
+
| Cyrillic | iso-8859-5 | ✅ | ✅ | iso-8859-5 | iso88595 |
|
|
129
|
+
| Cyrillic | koi8-r | ✅ | ✅ | koi8-r | koi8r |
|
|
130
|
+
| Cyrillic | koi8-ru | ❌ | ✅ | koi8-u | koi8ru |
|
|
131
|
+
| Cyrillic | koi8-t | ✅ | ❌ | — | koi8t |
|
|
132
|
+
| Cyrillic | koi8-u | ✅ | ✅ | koi8-u | koi8u |
|
|
133
|
+
| Cyrillic | kz1048 | ✅ | ❌ | — | rk1048 |
|
|
134
|
+
| Cyrillic | maccyrillic | ✅ | ✅ | x-mac-cyrillic | maccyrillic |
|
|
135
|
+
| Cyrillic | macukraine | ❌ | ❌ | — | macukraine |
|
|
136
|
+
| Cyrillic | mik | ❌ | ❌ | — | mik |
|
|
137
|
+
| Cyrillic | ptcp154 | ✅ | ❌ | — | pt154 |
|
|
138
|
+
| Cyrillic | windows-1251 | ✅ | ✅ | windows-1251 | windows1251 |
|
|
139
|
+
| Georgian | georgian-academy | ❌ | ❌ | — | georgianacademy |
|
|
140
|
+
| Georgian | georgian-ps | ❌ | ❌ | — | georgianps |
|
|
141
|
+
| Greek | cp737 | ✅ | ❌ | — | cp737 |
|
|
142
|
+
| Greek | cp869 | ✅ | ❌ | — | cp869 |
|
|
143
|
+
| Greek | cp875 | ✅ | ❌ | — | — |
|
|
144
|
+
| Greek | iso-8859-7 | ✅ | ✅ | iso-8859-7 | iso88597 |
|
|
145
|
+
| Greek | macgreek | ✅ | ❌ | — | macgreek |
|
|
146
|
+
| Greek | windows-1253 | ✅ | ✅ | windows-1253 | windows1253 |
|
|
147
|
+
| Hebrew | cp424 | ✅ | ❌ | — | — |
|
|
148
|
+
| Hebrew | cp856 | ✅ | ❌ | — | cp856 |
|
|
149
|
+
| Hebrew | cp862 | ✅ | ❌ | — | cp862 |
|
|
150
|
+
| Hebrew | iso-8859-8 | ✅ | ✅ | iso-8859-8-i | iso88598 |
|
|
151
|
+
| Hebrew | windows-1255 | ✅ | ✅ | windows-1255 | windows1255 |
|
|
152
|
+
| Japanese | cp932 | ✅ | ✅ | shift_jis | shiftjis |
|
|
153
|
+
| Japanese | euc-jp | ✅ | ✅ | euc-jp | eucjp |
|
|
154
|
+
| Japanese | iso-2022-jp | ✅ | ✅ | iso-2022-jp | — |
|
|
155
|
+
| Japanese | iso646-jp | ❌ | ❌ | — | iso646jp |
|
|
156
|
+
| Japanese | iso2022_jp_2004 | ✅ | ❌ | — | — |
|
|
157
|
+
| Japanese | iso2022_jp_ext | ✅ | ❌ | — | — |
|
|
158
|
+
| Japanese | shift_jis | ✅ | ✅ | shift_jis | shiftjis |
|
|
159
|
+
| Korean | cp949 | ✅ | ✅ | euc-kr | cp949 |
|
|
160
|
+
| Korean | euc-kr | ✅ | ✅ | euc-kr | cp949 |
|
|
161
|
+
| Korean | iso-2022-kr | ✅ | ❌ | — | — |
|
|
162
|
+
| Korean | johab | ✅ | ❌ | — | — |
|
|
163
|
+
| Lao | cp1133 | ❌ | ❌ | — | cp1133 |
|
|
164
|
+
| Nordic | cp861 | ✅ | ❌ | — | cp861 |
|
|
165
|
+
| Nordic | cp865 | ✅ | ❌ | — | cp865 |
|
|
166
|
+
| Nordic | iso8859-10 | ✅ | ✅ | iso-8859-10 | iso885910 |
|
|
167
|
+
| Nordic | maciceland | ✅ | ❌ | — | maciceland |
|
|
168
|
+
| South-Eastern European | iso8859-16 | ✅ | ✅ | iso-8859-16 | iso885916 |
|
|
169
|
+
| South-Eastern European | macromania | ❌ | ❌ | — | macromania |
|
|
170
|
+
| Southern European | iso8859-3 | ✅ | ✅ | iso-8859-3 | iso88593 |
|
|
171
|
+
| Thai | cp874 | ✅ | ✅ | windows-874 | windows874 |
|
|
172
|
+
| Thai | cp1161 | ❌ | ❌ | — | cp1161 |
|
|
173
|
+
| Thai | cp1162 | ❌ | ❌ | — | cp1162 |
|
|
174
|
+
| Thai | iso-8859-11 | ❌ | ✅ | windows-874 | iso885911 |
|
|
175
|
+
| Thai | macthai | ❌ | ❌ | — | macthai |
|
|
176
|
+
| Thai | tis-620 | ✅ | ✅ | windows-874 | tis620 |
|
|
177
|
+
| Turkish | cp857 | ✅ | ❌ | — | cp857 |
|
|
178
|
+
| Turkish | cp1026 | ✅ | ❌ | — | — |
|
|
179
|
+
| Turkish | iso-8859-9 | ✅ | ✅ | windows-1254 | iso88599 |
|
|
180
|
+
| Turkish | macturkish | ✅ | ❌ | — | macturkish |
|
|
181
|
+
| Turkish | windows-1254 | ✅ | ✅ | windows-1254 | windows1254 |
|
|
182
|
+
| Unicode | cesu-8 | ❌ | ❌ | — | cesu8 |
|
|
183
|
+
| Unicode | utf-7 | ✅ | ❌ | — | utf7 |
|
|
184
|
+
| Unicode | utf-8 | ✅ | ✅ | utf-8 | utf-8 |
|
|
185
|
+
| Unicode | utf-8-sig | ✅ | ✅ | utf-8 | utf-8 |
|
|
186
|
+
| Unicode | utf-16 | ✅ | ❌ | — | utf16 |
|
|
187
|
+
| Unicode | utf-16-be | ✅ | ✅ | utf-16be | utf16be |
|
|
188
|
+
| Unicode | utf-16-le | ✅ | ✅ | utf-16le | utf16le |
|
|
189
|
+
| Unicode | utf-32 | ✅ | ❌ | — | utf32 |
|
|
190
|
+
| Unicode | utf-32-be | ✅ | ❌ | — | utf32be |
|
|
191
|
+
| Unicode | utf-32-le | ✅ | ❌ | — | utf32le |
|
|
192
|
+
| Vietnamese | cp1129 | ❌ | ❌ | — | cp1129 |
|
|
193
|
+
| Vietnamese | cp1163 | ❌ | ❌ | — | cp1163 |
|
|
194
|
+
| Vietnamese | cp1258 | ✅ | ✅ | windows-1258 | windows1258 |
|
|
195
|
+
| Vietnamese | tcvn | ❌ | ❌ | — | tcvn |
|
|
196
|
+
| Vietnamese | viscii | ❌ | ❌ | — | viscii |
|
|
197
|
+
| Western | cp273 | ✅ | ❌ | — | — |
|
|
198
|
+
| Western | cp437 | ✅ | ❌ | — | cp437 |
|
|
199
|
+
| Western | cp500 | ✅ | ❌ | — | — |
|
|
200
|
+
| Western | cp850 | ✅ | ❌ | — | cp850 |
|
|
201
|
+
| Western | cp858 | ✅ | ❌ | — | cp858 |
|
|
202
|
+
| Western | cp860 | ✅ | ❌ | — | cp860 |
|
|
203
|
+
| Western | cp863 | ✅ | ❌ | — | cp863 |
|
|
204
|
+
| Western | cp1140 | ✅ | ❌ | — | — |
|
|
205
|
+
| Western | hp-roman8 | ✅ | ❌ | — | hproman8 |
|
|
206
|
+
| Western | iso-8859-1 | ✅ | ✅ | windows-1252 | iso88591 |
|
|
207
|
+
| Western | iso8859-15 | ✅ | ✅ | iso-8859-15 | iso885915 |
|
|
208
|
+
| Western | macroman | ✅ | ✅ | macintosh | macroman |
|
|
209
|
+
| Western | windows-1252 | ✅ | ✅ | windows-1252 | windows1252 |
|
|
181
210
|
|
|
182
211
|
<!-- ENCODINGS_END -->
|
|
183
212
|
|
|
@@ -241,16 +270,16 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
|
|
|
241
270
|
|
|
242
271
|
| Chunk/Module/File | Composition |
|
|
243
272
|
| :-------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- |
|
|
244
|
-
| **dist/dpuse-shared.es.js** |
|
|
245
|
-
| src → index.ts + 13 more | `████████████████░░░░`
|
|
246
|
-
| ↳ index.ts |
|
|
247
|
-
| ↳ dataFormatIcons.ts | `▒▒▒▒▒░░░░░░░░░░░░░░░`
|
|
248
|
-
| ↳ objectParsing.ts |
|
|
249
|
-
| ↳ delimitedText.ts |
|
|
250
|
-
| ↳ connectorConfig.schema.ts | `░░░░░░░░░░░░░░░░░░░░`
|
|
251
|
-
| ↳ 9 smaller files | `▒░░░░░░░░░░░░░░░░░░░`
|
|
252
|
-
| valibot → dist/index.mjs | `██░░░░░░░░░░░░░░░░░░`
|
|
253
|
-
| (bundler output, whitespace & JSON) | `██░░░░░░░░░░░░░░░░░░` 10.
|
|
273
|
+
| **dist/dpuse-shared.es.js** | 71.8 kB · gzip 19.0 kB · 100.0% of the build |
|
|
274
|
+
| src → index.ts + 13 more | `████████████████░░░░` 79.4% · 57.1 kB |
|
|
275
|
+
| ↳ index.ts | `▒▒▒▒▒▒▒▒░░░░░░░░░░░░` 41.2% · 29.6 kB |
|
|
276
|
+
| ↳ dataFormatIcons.ts | `▒▒▒▒▒░░░░░░░░░░░░░░░` 23.4% · 16.8 kB |
|
|
277
|
+
| ↳ objectParsing.ts | `▒░░░░░░░░░░░░░░░░░░░` 7.0% · 5.0 kB |
|
|
278
|
+
| ↳ delimitedText.ts | `░░░░░░░░░░░░░░░░░░░░` 2.2% · 1.6 kB |
|
|
279
|
+
| ↳ connectorConfig.schema.ts | `░░░░░░░░░░░░░░░░░░░░` 1.8% · 1.3 kB |
|
|
280
|
+
| ↳ 9 smaller files | `▒░░░░░░░░░░░░░░░░░░░` 3.8% · 2.7 kB |
|
|
281
|
+
| valibot → dist/index.mjs | `██░░░░░░░░░░░░░░░░░░` 10.6% · 7.6 kB |
|
|
282
|
+
| (bundler output, whitespace & JSON) | `██░░░░░░░░░░░░░░░░░░` 10.0% · 7.2 kB |
|
|
254
283
|
|
|
255
284
|
Bars show each row's share of its output file. ↳ rows are part of the row above.
|
|
256
285
|
|