Sven Schliesing wrote:

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("[EMAIL PROTECTED]");
        assertTrue("invalid email", result);
    }
}

Runs with success. So the address "[EMAIL PROTECTED]" 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?

So, there are at least three things going on here:


1. The testcase above should fail in validator, but it doesn't because the validation check isn't good enough.
2. validator doesn't support punycode and doesn't support the quoted-printable unicode encoding mechanism used in email addresses.
3. The problem you describe in your emails.


[1] could be fixed easily enough. [2] could be fixed by enhancing validator. Your testcase shows that the problem isn't with validator, so [1] and [2] are not really of consequence to you right now, but they have got my interest. After re-reading your original mail and your latest mail together, I don't understand exactly what it is you are trying to achieve - could you demonstrate with some code or describe how you would demonstrate the problem to me?

If you are now fairly sure that the problem lies within Struts, it may be beneficial to post to the struts mailing list and copy me personally.

Cheers,
--
Michael


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to