Skip to content

timbray/rfc9839

Repository files navigation

RFC9839

Tests codecov 0 dependencies!

Go-language library to check for problematic Unicode code points.

This is based on the Unicode code-point subsets specified in RFC9839.

The package defines a Subset type and exports three instances, named Scalars, XmlChars, and Assignables. It exports three functions:

func (sub *Subset) ValidRune(r rune) bool
func (sub *Subset) ValidString(s string) bool
func (sub *Subset) ValidUtf8(u []byte) bool

A typical call might look like:

if !rfc9839.Assignables.ValidRune(r) {
	return t.Error("invalid rune")
}

About

Go-language library to check for problematic Unicode code points

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages