ebcdic-ascii
v1.1.5
Published
Node.js module for converting between EBCDIC and ASCII (ISO-8859-1) with support for multiple codesets
Downloads
959
Readme
ebcdic-ascii
Node.js module for converting between EBCDIC and ASCII (ISO-8859-1). Supported EBCDIC codesets:
- 0037: English
- 0273: German
- 0278: Finnish/Swedish
- 0297: French
- 1047: Latin 1/Open Systems
0xxx EBCDIC codesets were taken from longpelaexpertise.com.au.
1047 EBCDIC codeset was taken from this source.
Usage
Importing with import
import EBCDIC from "ebcdic-ascii"
Importing with require
const EBCDIC = require("ebcdic-ascii").default
Basic Usage
const converter = new EBCDIC("0037")
converter.toASCII("E385A2A340D485A2A2818785")
// returns "Test Message"
converter.toEBCDIC("54657374204D657373616765")
// returns "E385A2A340D485A2A2818785"
Check out index.d.ts
for documentation
Contributions
Feel free to add more languages in the same manner as the existing ones. When preparing a merge request, make sure to also write meaningful tests for your code. All contributions are highly appreciated!
Kind regards to all contributors that have helped to maintain this module:
- High Performance optimizations by @SeanHollen
- 0297 French added by Damartex Group and @kherdier
- 1047 Latin added by @leo1553
- 0278 Finnish/Swedish added by @markus-peltola