This is a test version of Biostars. For the public version, visit https://www.biostars.org.
In VCF files, what character encodings are used / legal?

In VCF files, what character encodings are used in practice?

What character encodings are expected for the format?

The examples I've seen seem to include single-byte characters. It's not clear whether it's intended to be 7-bit US-ASCII or 8-bit Latin1.

The 4.2 format specification doesn't mention encodings for VCF files. (It does specify that Unicode characters are not supported in characters and strings in BCF files)

vcf

1 answer

https://github.com/samtools/hts-specs/blob/VCFv4.3/VCFv4.3.tex

The character encoding of VCF files is UTF-8. UTF-8 is a multi-byte character encoding that is a strict superset of 7-bit ASCII and has the property that none of the bytes in any multi-byte characters are 7-bit ASCII bytes. As a result, most software that processes VCF files does not have to be aware of the possible presence of multi-byte UTF-8 characters.

7 minutes with a direct quote. Is Google spelled P-I-E-R-R-E in France?

Nice discussion. I'm pro-JSON though, lightweight and easier to parse, no?

Log in to answer this question.