qore
qore copied to clipboard
module-yaml: parse_yaml probably assumes utf-8 encoding of the source string
I did not confirm this with an actual example, but the implementation suggests it:
any parse_yaml(string yaml) [flags=RET_VALUE_ONLY] {
QoreYamlParser parser(*yaml, xsink);
return parser.parse();
}
DLLLOCAL QoreYamlParser(const QoreString &str, ExceptionSink *n_xsink) : QoreYamlBase(n_xsink), discard(false) {
yaml_parser_initialize(&parser);
yaml_parser_set_input_string(&parser, (const unsigned char *)str.getBuffer(), str.strlen());
yaml_parser_set_encoding(&parser, YAML_UTF8_ENCODING);
valid = true;
}
This will be handled easily once the stream API #869 is done