-
Bug
-
Resolution: Fixed
-
Normal
-
None
-
None
Since Javascript doesn't have something cool like \p
{Latin}, we have to do a range to catch latin characters and decide whether to show the sortname/localised name.
I did make a fix for this a while ago, but never put a branch up. Since it doesn't seem like I'm going to get round to it any time soon, the change I made was to change MB.utility.is_ascii in root/static/scripts/common/MB/utility.js from
MB.utility.is_ascii = function (str) { return ! /[^\u0000-\u00ff]/.test(str); };
to
MB.utility.is_ascii = function (str) { return ! /[^\u0000-\u02ff\u1E00-\u1EFF\u2000-\u207F]/.test(str); };
That adds all the latin blocks at the beginning of Unicode (which covers almost all latin characters in common usage), the block with Vietnamese characters and the block with the most common Unicode punctuation we use.
Also, it would make sense to change the function name from "is_ascii" to "is_latin", since we're not just checking for ASCII. Last time I looked, the inline search was the only place using that function.
- is related to
-
MBS-6769 Inline search shows sort name even when identical to name
- Closed