size = OS.GetLocaleInfo(lcid, OS.LOCALE_SISO3166CTRYNAME, buffer, length); String country = new String(buffer, 0, size - 1); if (!locale.getCountry().equals(country)) return 1;
String javaCountry = locale.getCountry(); if (javaCountry.length() != 0) { size = OS.GetLocaleInfo(lcid, OS.LOCALE_SISO3166CTRYNAME, buffer, length); String country = new String(buffer, 0, size - 1); if (!javaCountry.equals(country)) return 1; }
int EnumLocalesProc(int lpLocaleString) {		/* Get the locale ID */	int length = 8;	byte[] buffer = new byte[length];	OS.MoveMemory(buffer, lpLocaleString, length);	int lcid = Integer.parseInt(new String(buffer, 0, length), 16);	/* Check the language */	int size = OS.GetLocaleInfo(lcid, OS.LOCALE_SISO639LANGNAME, buffer, length);	String lang = new String(buffer, 0, size - 1);	if (!locale.getLanguage().equals(lang)) return 1;	/* Check the country */	size = OS.GetLocaleInfo(lcid, OS.LOCALE_SISO3166CTRYNAME, buffer, length);	String country = new String(buffer, 0, size - 1);	if (!locale.getCountry().equals(country)) return 1;	/* Get the charset */	size = OS.GetLocaleInfo(lcid, OS.LOCALE_IDEFAULTANSICODEPAGE, buffer, length);	int cp = Integer.parseInt(new String(buffer, 0, size - 1));	int [] lpCs = new int[8];	OS.TranslateCharsetInfo(cp, lpCs, OS.TCI_SRCCODEPAGE);	data.lfCharSet = (byte)lpCs[0];	return 0;}