Hello Andrew!

Sunday, November 18, 2001, 9:59:11 PM, you wrote:

AP> 2. Ahh, national symbols. Though the page is in English (and it works fine
AP> for English), I suddenly came across the problem of handling national
AP> symbols. Let's say, we use Cyrillics.

AP> After sending the message it's not
AP> possible to read it in mail reader. All the characters are replaced with "?".

Well,

1) i guess that you should take measures to .getParameter()
cyrillics correctly. For any servlet 2.3 system including tomcat 4.0.1
you can do request.setCharacterEncoding() before getting the first
parameter. For tomcat 3.3 there's some <RequestDecode/> interceptor
or something alike that can help decode cyrillics for you.(read the
docs) For weblogic you can say that all pages whose paths starts with
/rus/ (for example) should have their params decoded as windows-1251.

2) The javamail interface has some sort of setting the charset, do
not remember right now. But you should be able to set it somewhere.
I recommend you using koi8-r (or koi8r) character encoding, it worked
best for me when i was using javamail.

AP> It could be a problem with UTF and Cyrillic encoding (though my page uses
AP> standard western ISO). Should I explicitly set the encoding in the
AP> request/response header or that's not the point?
You should take care to decode your parameters correctly and set the
encoding on the javamail interface.

Let others reply on validation of the email address.. you can just
catch the exception after all on the server side, can't you?

Best regards, Anthony Tagunov

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to