Closed max0x7ba closed 6 years ago
FNV-1a works on octets.
In hash32 it does hash ^= str.charCodeAt(i); which does not do the right thing for Unicode, for example "Я".charCodeAt(0) is 1071.
hash32
hash ^= str.charCodeAt(i);
"Я".charCodeAt(0)
FNV-1a works on octets.
In
hash32
it doeshash ^= str.charCodeAt(i);
which does not do the right thing for Unicode, for example"Я".charCodeAt(0)
is 1071.