- if (j != string::npos) {
- string parent(fmt, i + 1, j - i - 1);
- string label = expandLabel(buf, tclass[parent], appendix);
- fmt = string(fmt, 0, i) + label + string(fmt, j + 1, string::npos);
+ if (j != docstring::npos) {
+ docstring parent(fmt, i + 1, j - i - 1);
+ // FIXME UNICODE
+ docstring label = expandLabel(buf, tclass[to_utf8(parent)], appendix);
+ fmt = docstring(fmt, 0, i) + label + docstring(fmt, j + 1, docstring::npos);