Forum Moderators: coopster

Message Too Old, No Replies

character sets from other languages

         

amikin

4:59 pm on Mar 20, 2007 (gmt 0)

10+ Year Member



Not sure if my issue is database related or php related.

I have a form where if French accents are input, the proper character is not appearing in the database. At first we suspected it was a database issue, but I did a quick test and echoed out my variable once the form was submitted and it output the same thing, which leads me to believe the problem is with the php settings since it's not interpreting the post data properly.

I also did a quick test on the form itself and used an alert to show me the value javascript was seeing in the field it it spits out the proper character.

So, I guess what I'm after is affermation that it would be php doing this and what needs to be changed to fix it.

Scally_Ally

5:27 pm on Mar 20, 2007 (gmt 0)

10+ Year Member



maybe you could use htmlspecialchars() to encode the charcters when they are submitted, then when you have to write them just decode them.

Ally

encyclo

5:38 pm on Mar 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What charset are you declaring on the page/form, and what charset are you using for the database?

amikin

6:01 pm on Mar 20, 2007 (gmt 0)

10+ Year Member



[SMACK FOREHEAD]

never thought to check the charset on the actual html page

sure enough that was it.