86#undef SPIRIT_PO_DEFAULT_CHARSET
94 if (content_type_line.size()) {
95 auto it = content_type_line.begin();
96 auto end = content_type_line.end();
99 if (qi::parse(it, end, gram, ct)) {
102 return "PO file declared charset of '" +
charset +
"', but spirit_po only supports UTF-8 and ASCII for this.";
110 std::string content_transfer_encoding =
find_header_line(header,
"Content-Transfer-Encoding:");
111 if (content_transfer_encoding.size()) {
112 auto it = content_transfer_encoding.begin();
113 auto end = content_transfer_encoding.end();
114 if (!qi::phrase_parse(it, end, qi::lit(
"8bit"), qi::ascii::space)) {
115 return "PO header 'Content-Transfer-Encoding' must be '8bit' if specified, but PO file declared '" + content_transfer_encoding +
"'";
121 if (num_plurals_line.size()) {
122 auto it = num_plurals_line.begin();
123 auto end = num_plurals_line.end();
127 if (qi::parse(it, end, gram, info)) {