what is boost::spirit::standard encoding?

Viewed 35

There are several Character Encoding Namespace in boost spirit, including:

boost::spirit::qi::ascii
boost::spirit::qi::iso8859_1
boost::spirit::qi::standard
boost::spirit::qi::standard_wide
boost::spirit::qi::unicode

I know ascii and iso8859_1 and unicode, but I don't know what are standard and standard_wide.

I don't know what exactly boost::spirit::qi::unicode is neither, UTF-8, UTF-16 or UTF-32? It should be one of the three, not all.

I also noticed the standard can match characters encoded as UTF-8.

But I can't find any detail about these encoding spaces, what do they mean exactly.

1 Answers

Standard uses the standard library character classifications. So, it matches the behaviour from <cctype> which uses the system locale.

In effect it is less strict than qi::ascii which supports only 7-bit characters.

qi::standard supports 8-bit chars, where the meaning of the additional values depends on the system's locale.


To the side question: unicode uses 32-bit characters with code points in the range 0x00 to 0x10FFFF

Related