Subj: Unicode form field validation in javascript

From: Magda Danish (Unicode) (v-magdad@microsoft.com)
Date: Wed Aug 01 2007 - 12:10:14 CDT

  • Next message: Addison Phillips: "Re: questions on implementing an embeded system that supports unicode"

     Dušan,

    I am forwarding your email to the Unicode list http://www.unicode.org/consortium/distlist.html. I am sure one of the many experts on the list will be able to help you.

    Regards,
    ---------------------------
    Magda Danish
    Sr. Administrative Director
    The Unicode Consortium
    650-693-3921
    magda@unicode.org

    -----Original Message-----
    Date/Time: Tue Jul 31 17:32:41 CDT 2007
    Contact: knez.dusan@gmail.com
    Name: Dušan Knežević
    Report Type: Problems / Feedback about website Opt Subject: Unicode form field validation in javascript

    Dear Sir,

    I hope this is the right instance to ask for help regarding the problem explained in short in subject line.

    On my site: www.makeliterature.com, in registration form I have field similar to those above, in which I ask users to enter username and other personal information. I would like to allow them to use their own local encoding so I have set um my servers and referring web pages accordingly (html-php, mysql, apache - battery I use).

    Naturaly, I would like to implement form validation both on client and on the server side. While there is no problem with PHP script , on the other hand, I simply didn't managed my javascript validation to make work. And I have turned over Internet twice for the solution, no one worked for me.

    In PHP I used the folowing code and reg.ex pattern:

    $legalChars = "/\p{L}|\p{Pc}|\p{N}/"; // check for letters, numbers and underscores $legalCharsCount = preg_match_all($legalChars,$strng,$blb);
    $illegalCharsCount = mb_strlen($strng,"UTF-8") - $legalCharsCount;

    I wonder, how to implement the similar javascript validation with regular expressions on client side.

    I hope someone from you guys will bring me some solutions. Also, it would be good idea to generally Unicode.org spread awareness of all relevant solutions for the problems like it is mine, as there is a lot desperate posting in Internet on this subject.

    Thank you for your time, and god bless all that bring some light in this issue..

    Best regards,

    Dusan.

    -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- (End of Report)



    This archive was generated by hypermail 2.1.5 : Wed Aug 01 2007 - 12:13:13 CDT