Skip to content

YAML 1.2: Error parsing C1 control character inside double-quoted string #179

@0f-0b

Description

@0f-0b
package main

import (
	"fmt"

	"go.yaml.in/yaml/v4"
)

func main() {
	var str string
	err := yaml.Unmarshal([]byte("\"\u0080\""), &str)
	if err != nil {
		fmt.Println(err)
	}
}

This program should exit without printing anything, but it reports the error yaml: control characters are not allowed. To quote the YAML 1.2 specification, “YAML processors must allow all non-C0 characters inside quoted scalars.”

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions