toutf8

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

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 9 Imported by: 1

README

Build Status codecov GoDoc

Converts text to UTF-8

This is a friendlier API for the golang.org/x/text collection of packages, making it easier to call for arbitrary input in an iconv-like manner.

Documentation

Overview

Package toutf8 converts text to UTF-8.

This is a friendlier API for the golang.org/x/text collection of packages, making it easier to call for arbitrary input in an iconv-like manner.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Byte

func Byte(charset string, input []byte) ([]byte, error)

Byte converts the bytes from the input to UTF-8.

func FindEncoding

func FindEncoding(charset string) (encoding.Encoding, bool)

FindEncoding attempts to find an encoding by name.

func Reader

func Reader(charset string, input io.Reader) (io.Reader, error)

Reader converts the bytes from the input reader to UTF-8.

Types

type ErrUnknownCharset

type ErrUnknownCharset string

ErrUnknownCharset is used when the passed character set is unknown to this library.

func (ErrUnknownCharset) Error

func (s ErrUnknownCharset) Error() string

Jump to

Keyboard shortcuts

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