Help us shape the future of Go! Take the 2026 Go Developer Survey

charsetutil

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ISO_8859_1 = "ISO-8859-1"
	UTF_8      = "UTF-8"
	GBK        = "GBK"
)

常量定义

Variables

This section is empty.

Functions

This section is empty.

Types

type CharsetUtil

type CharsetUtil struct{}

CharsetUtil 字符编码工具类

func (*CharsetUtil) Charset

func (c *CharsetUtil) Charset(name string) (encoding.Encoding, error)

Charset 方法将编码字符串转为对应的 Charset 对象

func (*CharsetUtil) Convert

func (c *CharsetUtil) Convert(input string, from string, to string) (string, error)

Convert 方法在两种编码之间转换

func (*CharsetUtil) DefaultCharset

func (c *CharsetUtil) DefaultCharset() encoding.Encoding

DefaultCharset 返回系统默认编码

func (*CharsetUtil) DefaultCharsetName

func (c *CharsetUtil) DefaultCharsetName() string

DefaultCharsetName 返回系统默认编码字符串

Jump to

Keyboard shortcuts

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