Skip to content

Commit

Permalink
Merge branch 'tlwr-feature-ebcdic'
Browse files Browse the repository at this point in the history
  • Loading branch information
n1474335 committed May 19, 2017
2 parents 9a6e4b1 + 19103a6 commit 7b18a2f
Show file tree
Hide file tree
Showing 6 changed files with 2,692 additions and 29 deletions.
6 changes: 4 additions & 2 deletions src/core/config/Categories.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ const Categories = [
"Hex to PEM",
"Parse ASN.1 hex string",
"Change IP format",
"Text encoding",
"Encode text",
"Decode text",
"Swap endianness",
]
},
Expand Down Expand Up @@ -143,7 +144,8 @@ const Categories = [
{
name: "Language",
ops: [
"Text encoding",
"Encode text",
"Decode text",
"Unescape Unicode Characters",
]
},
Expand Down
38 changes: 30 additions & 8 deletions src/core/config/OperationConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -887,21 +887,43 @@ const OperationConfig = {
}
]
},
"Text encoding": {
description: "Translates the data between different character encodings.<br><br>Supported charsets are:<ul><li>UTF8</li><li>UTF16</li><li>UTF16LE (little-endian)</li><li>UTF16BE (big-endian)</li><li>Hex</li><li>Base64</li><li>Latin1 (ISO-8859-1)</li><li>Windows-1251</li></ul>",
run: CharEnc.run,
"Encode text": {
description: [
"Encodes text into the chosen character encoding.",
"<br><br>",
"Supported charsets are:",
"<ul>",
Object.keys(CharEnc.IO_FORMAT).map(e => `<li>${e}</li>`).join("\n"),
"</ul>",
].join("\n"),
run: CharEnc.runEncode,
inputType: "string",
outputType: "string",
outputType: "byteArray",
args: [
{
name: "Input type",
name: "Encoding",
type: "option",
value: CharEnc.IO_FORMAT
value: Object.keys(CharEnc.IO_FORMAT),
},
]
},
"Decode text": {
description: [
"Decodes text from the chosen character encoding.",
"<br><br>",
"Supported charsets are:",
"<ul>",
Object.keys(CharEnc.IO_FORMAT).map(e => `<li>${e}</li>`).join("\n"),
"</ul>",
].join("\n"),
run: CharEnc.runDecode,
inputType: "byteArray",
outputType: "string",
args: [
{
name: "Output type",
name: "Encoding",
type: "option",
value: CharEnc.IO_FORMAT
value: Object.keys(CharEnc.IO_FORMAT),
},
]
},
Expand Down
Loading

0 comments on commit 7b18a2f

Please sign in to comment.