//=============================================================================
// Unlock Unicode - By TomatoRadio
// TR_UnlockUnicode.js
//=============================================================================

var Imported = Imported || {};
Imported.TR_UnlockUnicode = true;

var TR = TR || {};
TR.UU = TR.UU || {};
TR.UU.version = 1.0;

/*: 
 *
 * @plugindesc Allows all Unicode characters.
 * Version 1.0
 * @author TomatoRadio
 * 
 * @help
 * Allows for fonts that use far out Unicode to not be dummied out as a Question Mark Diamond
 * 
*/

	function isTextInCurrentLanguage(text) {
    return true;
		const lang = LanguageManager.defaultLanguage()
		switch(lang) {
			default:
        let englishOnly = /^[a-zA-Z0-9!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?☆ ]*$/;
				if(!englishOnly.test(text)) {return false}
				break;
			case "jp":
				let japaneseOnly = /^[\u3000-\u303F|\u3040-\u309F|\u30A0-\u30FF|\uFF00-\uFFEF|\u4E00-\u9FAF|\u2605-\u2606|\u2190-\u2195|\u203B|0-9!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?☆ ]*$/g;
				if(!japaneseOnly.test(text)) {return false}
				break
			case "kr":
				let koreanOnly = /(^[\u3131-\u314e|\u314f-\u3163|\uac00-\ud7a3|0-9!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?☆ ]*$)/g
				if(!koreanOnly.test(text)) {return false}
			case "sc":
				let scOnly = /^([\u4e00-\u9eff|\u3000-\u303F|0-9!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?☆ ])*$/
				if(!scOnly.test(text)) {return false}
		}
		return true
	}