I have an HTML form with a textarea input box. When the user conducts a
post request (e.g. clicks the submit button), an HTML preview page is
presented to them with the information they have filled out in the prior
page's form elements.
Naturally some users like to copy and paste text into the textarea box and
presumably do so from say a word processor program. Some Macintosh based
users I know of experience problems with foreign looking characters
appearing in the HTML output, i.e tiny square boxes. The server processing
their requests is PC/Microsoft Windows (2000) based.
To fix the problem, I know this is a matter of removing certain control
characters. I would like to write some client side Javascript validation
code to handle this.
The problem for me is two-fold. I do not have a Mac/PowerPC to use for
testing. I am not all that familiar with Macs or know what control
characters to screen for. (About the only thing I know is Mac and Windows
use different control character representations for line feeds or carriage
returns or both).
Can someone shed some light on this for me? For example, which characters
to look for in parsing strings, i.e. \n, \t, etc. Thanks.
--
Peter O'Reilly