encoding

package
v0.0.0-...-3fcfa23 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package encoding 为输入的文件提供编码支持。

Index

Constants

View Source
const DefaultEncoding = "utf8"

DefaultEncoding 默认的编码名称,只能是 utf-8。

这里给出一个常量,是方便给其它包引用时有一个统一名称。

Variables

This section is empty.

Functions

func Encodings

func Encodings() []string

Encodings 返回支持的编码列表

func Transform

func Transform(path, encoding string) ([]byte, error)

Transform 将 path 指向的文件内容,按 encoding 编码进行加载, 并转换成 utf-8 之后返回其内容。

Types

This section is empty.

Jump to

Keyboard shortcuts

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