I notice the problem when I use the character ¦. For the 3000 character limit, I can fill the textarea with 3000 ampersands. The javascript showing the string length says 3000 and when I post the text, php says it's 3000. If I try 3000 of ¦ then javascript again shows 3000, but php shows a lot more, in the 5000's. ¦ has a html code ¦ and ¦ so I don't know why php is showing a problem. Why is this?
Edit: PHP shows that each ¦ has a string length of 2, while other characters have the usual 1. I notice that any character with an ASCII code higher than 160 has a php string length of 2: http://www.ascii.cl/htmlcodes.htm
strlen($_POST['text'])echo strlen("¦");echoes2