Giter Site home page Giter Site logo

go-ebcdic's Introduction

go-ebcdic

Go-Package for transcoding EBCDIC ↔ Unicode / UTF8

GoDoc Go

Features:

  • Supports multiple code pages (including Euro-Patches)
  • Optimized performance

Usage

Install:

go get github.com/indece-official/go-ebcdic

Use it in your code:

import (
    "github.com/indece-official/go-ebcdic"
)

...

func myEncode() {
    in := "This string special chars like § and Ö"

    encoded, err := ebcdic.Encode(in, ebcdic.EBCDIC037)
    if err != nil {
        return
    }
}

func myDecode() {
    in := []byte{0xE3, 0x88, 0x89, 0xA2, 0x40, 0xA2}

    decoded, err := ebcdic.Decode(in, ebcdic.EBCDIC037)
    if err != nil {
        return
    }
}

Supported code pages

Don't known which code page you have to use? The one most commonly used ist EBCDIC037 ;-)

Code Page Countries Source Comment
EBCDIC037 AUS, CAN, NZL, PRT, ZAF, USA See https://en.wikipedia.org/wiki/EBCDIC_037
EBCDIC273 DEU, AUT See https://en.wikipedia.org/wiki/EBCDIC_273
EBCDIC500 International See https://en.wikipedia.org/wiki/Code_page_37#500
EBCDIC1140 AUS, CAN, NZL, PRT, ZAF, USA See https://en.wikipedia.org/wiki/EBCDIC_1140 EBCDIC037 with Euro-Patch
EBCDIC1141 DEU, AUT See https://en.wikipedia.org/wiki/EBCDIC_1141 EBCDIC273 with Euro-Patch
EBCDIC1148 International See https://en.wikipedia.org/wiki/Code_page_37#500 EBCDIC500 with Euro-Patch

go-ebcdic's People

Contributors

indece-official avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.