Open subnetmarco opened 9 years ago
I found out why it behaves like this: When the library finds an UTF-8 value (with a decimal ASCII value greater than 128
, or Hex greater than 0x80
), it saves the data in a Base64 encoded binary format, instead of dumping the value as it is (if the system supports UTF-8 encoding there would be no need to Base64 encode the value).
https://github.com/acd/lua-yaml/blob/master/lyaml.c#L371
Maybe adding a configuration option would make it possible to enable/disable this check and would fix this edge case?
I have a YAML file (attached) with a multiline
nginx
property. When I try to parse it and dump it again as it is the multilinenginx
property is being stored as "binary" instead of a string:This is the original YAML file:
And this is the output, as you can see the
nginx
property is nowbinary
: