static chooseMode(content, encoding = null) {
			if (CharacterSetECI.SJIS.getName() === encoding && this.isOnlyDoubleByteKanji(content)) {
				// Choose Kanji mode if all input are double-byte characters
				return Mode$1.KANJI;
			}
			let hasNumeric = false;
			let hasAlphanumeric = false;
			for (let i = 0, length = content.length; i < length; ++i) {
				const c = content.charAt(i);
				if (Encoder.isDigit(c)) {
					hasNumeric = true;
				}
				else if (this.getAlphanumericCode(c.charCodeAt(0)) !== -1) {
					hasAlphanumeric = true;
				}
				else {
					return Mode$1.BYTE;
				}
			}
			if (hasAlphanumeric) {
				return Mode$1.ALPHANUMERIC;
			}
			if (hasNumeric) {
				return Mode$1.NUMERIC;
			}
			return Mode$1.BYTE;
		}
Choose the best mode by examining the content. Note that 'encoding' is used as a hint;
if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}.