commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven Schliesing <>
Subject Re: validator: email-validation not accepting german "umlaute"
Date Tue, 20 Apr 2004 11:41:30 GMT
I wrote a test to make sure where the problem is:

public class ValidatorTest extends TestCase {
     public void testEmail() {
         EmailValidator emailValidator = EmailValidator.getInstance();
         boolean result = emailValidator.isValid("test@mü");
         assertTrue("invalid email", result);

Runs with success. So the address "test@mü" is validated by the 
EmailValidator with success.

Seems that the problem is with struts. I also explicitly set the charset 
in the struts-config:

<controller contentType="text/html;charset=iso-8859-1" 
processorClass="org.apache.struts.action.RequestProcessor" />

No change.

Any other ideas?

Michael Davey wrote:
  > Valid domain names must contain only the characters a-z, A-Z, 0-9, "."
> and "-".  They must start with a letter and end with
> a letter or digit.  The "." symbol is used exclusively to seperate 
> subdomains (see RFC 1035 section 2.3.1 
> <>).
> To support internationalised domain names (IDN), both the client and the 
> server must be punycode aware.  Punycode is a fairly new standards 
> proposal (rfc3492) that encodes non-ascii characters into an ascii 
> string, prefixed with "xn--".  For instance, mü is encoded as 
> <>
> <>
> Commons-Validator would need to be made Punycode-aware to achieve what 
> you need, or alternatively, you could do the punycode translation in 
> your own code, before passing the string to validator.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message