fix: hash for Unicode will call write_u8 like Ascii does#73
fix: hash for Unicode will call write_u8 like Ascii does#73seanmonstar merged 1 commit intomasterfrom
Conversation
|
This still fails on let k1 = UniCase::new("Maße");
let k2 = UniCase::ascii("maße");But I will admit that this seems like a misuse of unicase in that situation, rather than being a reliable behaviour. |
|
Crazy personal opinion: that probably should yell at you and die. |
|
To make it worse, "Maße" means something like "measurements", while "Masse" means "mass" (as in weight or group of things/people), so they aren't even the same word. |
|
Even words that are spelled exactly the same can have different meanings based on context. This crate is not trying to say the words mean the same thing. It's saying that according to the Unicode Case Folding algorithm, they are equivalent for matching purposes. |
|
Putting it into a more formal specification. It's a logic bug if you use UniCase::ascii with non-ascii text, thus any inconsistencies are the fault of the user here and not the library. LGTM |
Closes #72
cc @conradludgate @orlp