private static void formatLegalCharacters(char characters[]) {
		int character = 0;
		for (int c = 0; c < characters.length; c++) {
			if (isLegalCharacter(characters[c]))
				characters[character] = characters[c];
			else
				characters[character] = ' ';
			if (character == 0 || characters[character] != ' '
					|| characters[character - 1] != ' ')
				character++;
		}
		for (int c = character; c < characters.length; c++)
			characters[c] = ' ';

	}