F
Fred
Hi,
I've been using java.net.URLEncoder to encode text coming from a form
on a web page before I store it in my database, and java.net.URLDecoder
to decode the text when I read it from the database so I can display it
to the user. I'm using UTF-8 character encoding.
I recently had a problem where a user copied and pasted text from the
Attachmate terminal emulator into a textarea and submitted the form.
The text was stored successfully, but when it came time to decode it,
the URLDecoder class started throwing errors. I'm guessing that some
characters that were UTF-8 incompatible came along for the ride,
because I've had similar problems with Attachmate in the past.
Are there other classes I should use to perform the encoding? Am I
using the best character encoding? Any suggestions would be greatly
appreciated.
Thank you.
Fred
I've been using java.net.URLEncoder to encode text coming from a form
on a web page before I store it in my database, and java.net.URLDecoder
to decode the text when I read it from the database so I can display it
to the user. I'm using UTF-8 character encoding.
I recently had a problem where a user copied and pasted text from the
Attachmate terminal emulator into a textarea and submitted the form.
The text was stored successfully, but when it came time to decode it,
the URLDecoder class started throwing errors. I'm guessing that some
characters that were UTF-8 incompatible came along for the ride,
because I've had similar problems with Attachmate in the past.
Are there other classes I should use to perform the encoding? Am I
using the best character encoding? Any suggestions would be greatly
appreciated.
Thank you.
Fred