Description
Encode supplied well-formed messages with selected existing UTF-8 base32/base64/Ascii85 or five-character HTML-entity encoders and sample practice cards; accepted labels include every source/encoding pair in that supplied bank yielding the same display, not universal encoding detection, and no-replacement applies to pairs rather than distinct prompts.
A parser corpus pairs literal input spellings or structured documents with observable parser results or explicitly constructed expectations. Successful parsing, semantic validity, and exact round-trip preservation are separate properties, so test records retain the relevant evidence.
Encode supplied well-formed messages with selected existing UTF-8 base32/base64/Ascii85 or five-character HTML-entity encoders and sample practice cards; accepted labels include every source/encoding pair in that supplied bank yielding the same display, not universal encoding detection, and no-replacement applies to pairs rather than distinct prompts.
When to use this tool
Use this generator to create reproducible text encoding detection practice cards cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.
How to use the tool and how it works
- Supply messages, encodings, count, withoutReplacement in the field shapes below. Set seed when you need an explicit replay.
- Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
- Read cards. Use the conventions below and keep answer-bearing fields separate when presenting an exercise.
Build the full supplied-message by encoding-label bank using UTF-8 Base32, Base64, Ascii85, or the supported HTML entities. Select bank entries under the replacement policy, then report every bank entry producing the same displayed spelling and its accepted encoding labels.1
Delegated operations used for this result: base32; base64. Their calculation or parsing conventions apply to the corresponding result fields.2, 3
| Input field | Meaning and units | Accepted input |
|---|---|---|
| messages | Messages | Required. Array of Text; maximum UTF-16 length 256.; minimum items 1; maximum items 16. |
| encodings | Encodings | Required. Array of Text; one of "base32", "base64", "ascii85", "html-entities".; minimum items 1; maximum items 4. |
| count | Requested count; the mechanics explain whether one draw expands into several returned records. | Required. Safe integer; minimum 1; maximum 32. |
| withoutReplacement | Without Replacement | Required. Boolean. |
| seed | Optional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed. | Optional. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| cards | Cards | Required. Array of Object; no unknown keys.; minimum items 1; maximum items 32. |
| cards[].display | Display | Required. Text; maximum UTF-16 length 2048. |
| cards[].sourceText | Source Text | Required. Text; maximum UTF-16 length 256. |
| cards[].generatedEncoding | Generated Encoding | Required. Text; one of "base32", "base64", "ascii85", "html-entities". |
| cards[].acceptedLabels | Accepted Labels | Required. Array of Text; one of "base32", "base64", "ascii85", "html-entities".; minimum items 1; maximum items 4. |
| cards[].matchingSources | Matching Sources | Required. Array of Object; no unknown keys.; minimum items 1; maximum items 64. |
| cards[].matchingSources[].encoding | Encoding | Required. Text; one of "base32", "base64", "ascii85", "html-entities". |
| cards[].matchingSources[].text | Text | Required. Text; maximum UTF-16 length 256. |
| cards[].uniqueWithinSuppliedBank | Unique Within Supplied Bank | Required. Boolean. |
| randomness | Replay metadata: source is seed or context; seed is the normalized 32-bit seed or null for a context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional numeric replay seed; normalization and precedence are explained below. | Required. Safe integer. or Null. |
| randomness.source | Source | Required. Text; one of "context", "seed". |
An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.
{
"input": {
"messages": [
"",
"foo"
],
"encodings": [
"base32",
"base64",
"ascii85",
"html-entities"
],
"count": 3,
"withoutReplacement": false,
"seed": 42
},
"output": {
"cards": [
{
"display": "MZXW6===",
"sourceText": "foo",
"generatedEncoding": "base32",
"acceptedLabels": [
"base32"
],
"matchingSources": [
{
"encoding": "base32",
"text": "foo"
}
],
"uniqueWithinSuppliedBank": true
},
{
"display": "",
"sourceText": "",
"generatedEncoding": "html-entities",
"acceptedLabels": [
"base32",
"base64",
"ascii85",
"html-entities"
],
"matchingSources": [
{
"encoding": "base32",
"text": ""
},
{
"encoding": "base64",
"text": ""
},
{
"encoding": "ascii85",
"text": ""
},
{
"encoding": "html-entities",
"text": ""
}
],
"uniqueWithinSuppliedBank": false
},
{
"display": "AoDS",
"sourceText": "foo",
"generatedEncoding": "ascii85",
"acceptedLabels": [
"ascii85"
],
"matchingSources": [
{
"encoding": "ascii85",
"text": "foo"
}
],
"uniqueWithinSuppliedBank": true
}
],
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- Distinct bank entries can have identical displays. Without replacement prevents repeated message/encoding pairs, not repeated spellings. Lone Unicode surrogates are rejected; this is finite-bank matching rather than universal encoding detection.
- A replay requires the same complete input and implementation. Randomized construction does not guarantee uniform coverage of every feasible output; finite samples can repeat unless a distinct-selection rule is explicitly stated.
- The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.
Alternative or Complementary methods
For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.
References
Similar or alternative tools
- Random Subtitle Timing Practice Set Generator
Draw supplied plain caption text and inclusive positive millisecond durations, then delegate characters/second and words/minute. Characters are JavaScript code points with explicit whitespace inclusion/exclusion; words are nonempty whitespace-separated tokens, not linguistic segmentation. Compare only caller-supplied limits, without claiming readability or stripping markup.
- Random Identifier Transcription Error Corpus Generator
Generate synthetic checksum-valid EAN-13 and 978-prefixed ISBN-13 originals, apply a selected decimal substitution, deletion, or adjacent transposition, and record actual GTIN/ISBN validator outcomes; swaps may be unchanged or remain valid, and checksum validity is not product or publication allocation.