fktn-k / fkYAML

A C++ header-only YAML library
MIT License
69 stars 7 forks source link

#209 Support auto-detection of Unicode encoding types including BOMs #223

Closed fktn-k closed 10 months ago

fktn-k commented 10 months ago

As the YAML specification shows, The first few bytes of input can be used to detect encodings (UTF-8, UTF-16BE/LE or UTF-32BE/LE) regardless of whether the input has a BOM or not at the beginning.
Following the instruction there, this PR has supported auto-detection of the encodings.
To achieve the detection above, inputs must begin with either a BOM or an ASCII character in any Unicode encodings, as the YAML specification specifies here.

coveralls commented 10 months ago

Coverage Status

coverage: 100.0%. remained the same when pulling 27570dd783635a6c3a15c8efef533d06b69da2ca on feature/209_detect_encoding_types into c374445d258f649877419a6b1bf86430351c444b on develop.