private void autoSelectEncoding() {
		Locale d = Locale.getDefault();
		String s = d.getLanguage();
		Page page = editor.getPage();
		if (d.equals(Locale.CHINA) || d.equals(Locale.PRC)) {
			page.setCharacterEncoding("GB18030");
		}
		else if (d.equals(Locale.TAIWAN))
			page.setCharacterEncoding("Big5");
		else if (d.equals(Locale.JAPAN))
			page.setCharacterEncoding("EUC-JP");
		else if (d.equals(Locale.KOREA))
			page.setCharacterEncoding("EUC-KR");
		else if (s.equals(new Locale("el", "", "").getLanguage()))
			page.setCharacterEncoding("ISO-8859-7");
		else if (sameLanguage(s, "he"))
			page.setCharacterEncoding("ISO-8859-8");
		else if (sameLanguage(s, "ru"))
			page.setCharacterEncoding("UTF-8");
		else if (sameLanguage(s, "ar"))
			page.setCharacterEncoding("ISO-8859-6");
		else if (sameLanguage(s, "th"))
			page.setCharacterEncoding("ISO-8859-11");
		else if (sameLanguage(s, "tr"))
			page.setCharacterEncoding("ISO-8859-9");
		else if (sameLanguage(s, "bs") || sameLanguage(s, "pl") || sameLanguage(s, "hr") || sameLanguage(s, "sk") || sameLanguage(s, "sl") || sameLanguage(s, "hu") || sameLanguage(s, "cs"))
			page.setCharacterEncoding("ISO-8859-2");
		else {
			page.setCharacterEncoding("UTF-8");
		}
	}