Standard library / unicode/utf8
utf8.RuneError
Replacement rune U+FFFD; decoding a valid literal U+FFFD has width three, unlike malformed input with width one. Expected stdout: 'true 3\n'.
Formal Syntax & Structure
go syntaxgo
const RuneError = '\uFFFD'Working Example
Example Snippetgo
package main
import ( "fmt" "unicode/utf8")
func main() { r, n := utf8.DecodeRuneInString("�") fmt.Println(r == utf8.RuneError, n)}