homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

special characters in form input since php 5

 3:26 am on Feb 13, 2014 (gmt 0)

I run a job board (jamit). Recently I upgraded my server to Apache 2.4.7 and PHP to 5 (5.4.25). Since that, special characters such as ( ) appear in form input (textarea field). I am sure before the upgrade, there was no such issue. I believe it was caused by the new version of Php.

Since jamit board has stopped development. I really need to solve this issue otherwise I have to edit manually ever job post.

Than you in advance for your input.



 8:34 am on Feb 13, 2014 (gmt 0)

At what point do these special characters appear? When the form is first displayed and is empty? Or when redisplaying already submitted data?

This looks like a character encoding issue? This might even be coming from your database?


 4:07 pm on Feb 13, 2014 (gmt 0)

That happens when the form has been submitted. Thank you.


 7:26 pm on Feb 20, 2014 (gmt 0)

Just taking a wild guess here but since you mentioned the upgrade to PHP 5.4.x and if you were not serving your pages as utf-8 before it may be the default_charset. Here is the note from the changelog, particularly the entry found in 5.4.0 itself:

Changed default value of "default_charset" php.ini option from ISO-8859-1 to UTF-8.


The directive: [php.net...]


 11:23 pm on Feb 20, 2014 (gmt 0)

:: detour to look up ::

Acircum = C2 (8859-1) and C382 (UTF-8)
82 (8859-1) = "break permitted here" = C282 (UTF-8)

Bingo. What does "break permitted here" mean? Something involving form submission, I'd have to guess.

The moment you see Acircum or Atilde, you can say with 99.99% certainty that it's a file-encoding mismatch.


 4:08 pm on Feb 21, 2014 (gmt 0)

Thanks you both for answering me. So I looked at php configuration, and found the default_charset was actually iso-8859. So I changed it to UTF-8 and solved the problem.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved