]> git.lyx.org Git - lyx.git/blobdiff - src/Author.cpp
ui glitch
[lyx.git] / src / Author.cpp
index e88bb7f4905899e0a7d27744177f1a30d5b29f07..08349265009da4d6124626b13e1dede3310f1a70 100644 (file)
@@ -26,11 +26,11 @@ namespace lyx {
 static int computeHash(docstring const & name,
        docstring const & email)
 {
-       string const full_author_string = to_ascii(name + email);
+       string const full_author_string = to_utf8(name + email);
        // Bernstein's hash function
        unsigned int hash = 5381;
        for (unsigned int i = 0; i < full_author_string.length(); ++i)
-               hash = ((hash << 5) + hash) + unsigned int(full_author_string[i]);
+               hash = ((hash << 5) + hash) + (unsigned int)(full_author_string[i]);
        return int(hash);
 }