Make unicode chars lower case.

This commit is contained in:
John-David Dalton
2014-11-09 01:34:24 -08:00
parent 31e8df4a59
commit 9660c22a9f
2 changed files with 30 additions and 30 deletions

View File

@@ -80,7 +80,7 @@
var reHostCtor = /^\[object .+?Constructor\]$/;
/** Used to match latin-1 supplement letters (excluding mathematical operators) */
var reLatin1 = /[\xC0-\xD6\xD8-\xDE\xDF-\xF6\xF8-\xFF]/g;
var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
/** Used to ensure capturing order of template delimiters */
var reNoMatch = /($^)/;
@@ -100,8 +100,8 @@
/** Used to match words to create compound words */
var reWords = (function() {
var upper = '[A-Z\\xC0-\\xD6\\xD8-\\xDE]',
lower = '[a-z\\xDF-\\xF6\\xF8-\\xFF]+';
var upper = '[A-Z\\xc0-\\xd6\\xd8-\\xde]',
lower = '[a-z\\xdf-\\xf6\\xf8-\\xff]+';
return RegExp(upper + '{2,}(?=' + upper + lower + ')|' + upper + '?' + lower + '|' + upper + '+|[0-9]+', 'g');
}());
@@ -109,13 +109,13 @@
/** Used to detect and test whitespace */
var whitespace = (
// whitespace
' \t\x0B\f\xA0\ufeff' +
' \t\x0b\f\xa0\ufeff' +
// line terminators
'\n\r\u2028\u2029' +
// unicode category "Zs" space separators
'\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000'
'\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000'
);
/** Used to assign default `context` object properties */
@@ -202,23 +202,23 @@
/** Used to map latin-1 supplementary letters to basic latin letters */
var deburredLetters = {
'\xC0': 'A', '\xC1': 'A', '\xC2': 'A', '\xC3': 'A', '\xC4': 'A', '\xC5': 'A',
'\xE0': 'a', '\xE1': 'a', '\xE2': 'a', '\xE3': 'a', '\xE4': 'a', '\xE5': 'a',
'\xC7': 'C', '\xE7': 'c',
'\xD0': 'D', '\xF0': 'd',
'\xC8': 'E', '\xC9': 'E', '\xCA': 'E', '\xCB': 'E',
'\xE8': 'e', '\xE9': 'e', '\xEA': 'e', '\xEB': 'e',
'\xCC': 'I', '\xCD': 'I', '\xCE': 'I', '\xCF': 'I',
'\xEC': 'i', '\xED': 'i', '\xEE': 'i', '\xEF': 'i',
'\xD1': 'N', '\xF1': 'n',
'\xD2': 'O', '\xD3': 'O', '\xD4': 'O', '\xD5': 'O', '\xD6': 'O', '\xD8': 'O',
'\xF2': 'o', '\xF3': 'o', '\xF4': 'o', '\xF5': 'o', '\xF6': 'o', '\xF8': 'o',
'\xD9': 'U', '\xDA': 'U', '\xDB': 'U', '\xDC': 'U',
'\xF9': 'u', '\xFA': 'u', '\xFB': 'u', '\xFC': 'u',
'\xDD': 'Y', '\xFD': 'y', '\xFF': 'y',
'\xC6': 'Ae', '\xE6': 'ae',
'\xDE': 'Th', '\xFE': 'th',
'\xDF': 'ss'
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
'\xc7': 'C', '\xe7': 'c',
'\xd0': 'D', '\xf0': 'd',
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
'\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
'\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
'\xd1': 'N', '\xf1': 'n',
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
'\xc6': 'Ae', '\xe6': 'ae',
'\xde': 'Th', '\xfe': 'th',
'\xdf': 'ss'
};
/**