encoding

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFileEncoder

func GetFileEncoder(file *os.File) (encoder *encoding.Encoder, encName string, err error)

GetFileEncoder creates encoder with file encoding type and encoding name according to its encoding type, currently supports UTF-8, UTF-8 with BOM, UTF-16LE, UTF-16BE. The returned encoder does not add BOM at the start of the transformed buffer.

This function also tries to guess encoding type for some weird files with no BOM prepended(especially UTF-16LE and UTF-16BE files).

Types

This section is empty.

Jump to

Keyboard shortcuts

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