-static void buildaccent(string name, string param, string values)
-{
- size_t start = 0;
- for (size_t i = 0; i < param.size(); i++) {
- string key = name + "{" + param[i] + "}";
- // get the corresponding utf8-value
- if ((values[start] & 0xc0) != 0xc0) {
- // should not happen, utf8 encoding starts at least with 11xxxxxx
- start++;
- continue;
- }
- for (int j = 1; ;j++) {
- if (start + j >= values.size())
- break;
- if ((values[start+j] & 0xc0) == 0xc0) {
- // This is the first byte of following utf8 char
- accents[key] = values.substr(start, j);
- start += j;
- break;
+static void buildaccent(string n, string param, string values)
+{
+ stringstream s(n);
+ string name;
+ const char delim = '|';
+ while (getline(s, name, delim)) {
+ size_t start = 0;
+ for (size_t i = 0; i < param.size(); i++) {
+ string key = name + "{" + param[i] + "}";
+ // get the corresponding utf8-value
+ if ((values[start] & 0xc0) != 0xc0) {
+ // should not happen, utf8 encoding starts at least with 11xxxxxx
+ start++;
+ continue;
+ }
+ for (int j = 1; ;j++) {
+ if (start + j >= values.size())
+ break;
+ if ((values[start+j] & 0xc0) == 0xc0) {
+ // This is the first byte of following utf8 char
+ accents[key] = values.substr(start, j);
+ start += j;
+ break;
+ }