transl

package module
v0.0.0-...-3c488af Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 4 Imported by: 0

README

transl

Translate some character and byte formats

Documentation

Overview

Example
// "ÅÂÃÄÉÃ@£\u0096@ä\u0095\u0089\u0083\u0096\u0084\u0085"
input := []byte{197, 194, 195, 196, 201, 195, 64, 163, 150, 64, 228, 149, 137, 131, 150, 132, 133}
fmt.Println(DecodeEbcdic(input))
Output:

EBCDIC to Unicode

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeEbcdic

func DecodeEbcdic(bytes []byte) string

DecodeEbcdic converts EBCDIC text in `bytes` to UTF-8 string.

Types

type Encoding

type Encoding int
const (
	Unknown Encoding = iota
	Utf8
	Utf8WithBOM
	Utf16LE
)

func DetectTextEncoding

func DetectTextEncoding(bytes []byte) Encoding

DetectTextEncoding attempts to guess encoding of text stored in `bytes`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL