Skip to content

crazytyper/go-cesu8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-cesu8

Package cesu8 implements functions and constants to support text encoded in CESU-8. It implements functions comparable to the unicode/utf8 package for UTF-8 de- and encoding.

Extracted from https://github.com/SAP/go-hdb/blob/master/internal/unicode/cesu8.

utf8Encoded := "Hello 👋"
// 48 65 6C 6C 6F 20 F0 9F 91 8B

cesu8Encoded := cesu8.EncodeString(utf8Encoded)
// 48 65 6C 6C 6F 20 ED A0 BD ED B1 8B

utf8Encoded = cesu8.DecodeString(cesu8Encoded)
// 48 65 6C 6C 6F 20 F0 9F 91 8B

About

CESU-8 encoding/decoding for go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages