Today I face one problem. My job is Java Programmer, and I take responsibility for EDC Server. The problem is data that sent by EDC is not valid, I means.. it contains non-ASCII character.

Based on document specification EDC-EDC Server, EDC must sent data in ASCII character. This character will be forward to switching which is dont know what is non-ASCII character.

Since the data that will be send to switching its only contains alphanumeric (inluce space) and ‘=’, so I try this method:

private boolean checkFirst(String isoString){
	boolean retVal = true;
	if(!Pattern.matches("[a-zA-Z0-9= ]+", isoString)) {
		retVal = false;
	}
	return retVal;
}

And.. it works! Simple, and I dont need to check every single character on message. (dont forget to import java.util.regex.Pattern). And the problem now is solved:mrgreen: