X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FEncoding.cpp;h=7dc12af0271fb1849f1212a6a654980eb566b3c4;hb=28be7d552f62cc02fa86d7f79201d089bfb2d7b5;hp=9dde12d1213fc6d06e80ba0d28d27345605e1c39;hpb=a7b993143e2bd30a4ea0f69c4cd9dc9e98f3f21d;p=lyx.git diff --git a/src/Encoding.cpp b/src/Encoding.cpp index 9dde12d121..7dc12af027 100644 --- a/src/Encoding.cpp +++ b/src/Encoding.cpp @@ -264,11 +264,15 @@ vector Encoding::symbolsList() const vector symbols; for (char_type c = 0; c < start_encodable_; ++c) symbols.push_back(c); - //add all encodable characters + // add all encodable characters copy(encodable_.begin(), encodable_.end(), back_inserter(symbols)); - // now the ones from the unicodesymbols file - for (pair const & elem : unicodesymbols) - symbols.push_back(elem.first); + // now the ones from the unicodesymbols file that are not already there + for (pair const & elem : unicodesymbols) { + if (find(symbols.begin(), symbols.end(), elem.first) == symbols.end()) + symbols.push_back(elem.first); + } + // finally, sort the vector + sort(symbols.begin(), symbols.end()); return symbols; }