diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2021-03-22 16:40:12 +0100 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2021-03-22 16:40:12 +0100 |
commit | e2b0c8a788ec124a58a63ddc56d77fa317624bf5 (patch) | |
tree | 6e30f8f6c05eea32174fc045217fbee1d545a217 | |
parent | 9bbf5b653324ea567269b5ac18e09853dff4a0cd (diff) |
use boost spirit in unicode when appropriate
Change-Id: I9c97f3010ba7d4ec38dde0825e61fca6c7bce62e
-rw-r--r-- | src/lib/CDRParser.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lib/CDRParser.cpp b/src/lib/CDRParser.cpp index 045a1b9..f9dba55 100644 --- a/src/lib/CDRParser.cpp +++ b/src/lib/CDRParser.cpp @@ -17,6 +17,9 @@ #ifndef BOOST_ALL_NO_LIB #define BOOST_ALL_NO_LIB 1 #endif +#ifndef BOOST_SPIRIT_UNICODE +#define BOOST_SPIRIT_UNICODE 1 +#endif #include <boost/algorithm/string.hpp> #include <boost/optional.hpp> #include <boost/property_tree/json_parser.hpp> @@ -147,14 +150,14 @@ static int parseColourString(const char *colourString, libcdr::CDRColor &colour, bRes = phrase_parse(it, end, // Begin grammar ( - (cmodel | omit[+iso8859_1::alnum]) >> lit(',') - >> (cpalette | omit[+iso8859_1::alnum]) >> lit(',') + (cmodel | omit[+unicode::alnum]) >> lit(',') + >> (cpalette | omit[+unicode::alnum]) >> lit(',') >> *(uint_ >> lit(',')) - >> omit[(repeat(8)[iso8859_1::xdigit] >> '-' >> repeat(3)[repeat(4)[iso8859_1::xdigit] >> '-'] >> repeat(12)[iso8859_1::xdigit])] - >> -(lit(',') >> *iso8859_1::char_) + >> omit[(repeat(8)[unicode::xdigit] >> '-' >> repeat(3)[repeat(4)[unicode::xdigit] >> '-'] >> repeat(12)[unicode::xdigit])] + >> -(lit(',') >> *unicode::char_) ), // End grammar - iso8859_1::space, + unicode::space, colourModel, colourPalette, val, rest) && it == end; } |