I am creating a very simple form application with CGI / Perl.

The user enters a few fields of personal information into an HTML form, and the information gets written to a text file.

The tough part is that this is a Japanese application and some of the fields have to be double-byte and some have to be single-byte.

Is there a way to either:

1. Set up the HTML form with the fields defined so as to only allow double or single-byte input, or

2. Check for double or single-byte in Javascript before passing the data onto my Perl program, or

3. Check for double or single-byte in the Perl program.

Thanks in advance.