Jump to content

unicode to database changes after form submit


r4shyd

Recommended Posts

hi im tryng to add data using html form to sql db

 

when i enter "ޖހދޖހސދ" dhivehi letters and submit the form that value is changed in the database to "Þ‡Þ¦Þ‡Þ¨Þަތު" this..

 

 

 

so what is wrong,

 

thanx

 

Link to comment
Share on other sites

sorry,, what do you mean everything

 

html page

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

 

database

# Column Type Collation Attributes                       Null         Default

2 lname varchar(100) utf8_unicode_ci No         None   Change   Drop

 

 

 

 

thnks for the reply

Link to comment
Share on other sites

MySQL also has a client charset that in cases like this, often does not default to UTF-8.  For this reason many people build a call into their database class to set the client charset explicitly.  Many people do this by issuing this query just after they connect to the database:

 

SET NAMES UTF8

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.