Jump to content

How to insert unicode data into mysql using php script from the command line?


Recommended Posts

I am running this php code from command line that fetches text (may contain unicode characters) and insert into a mysql table. I verified that the php variables have the unicode text, but when it does an insert, the table columns are blank. I can accomplish the same with an html form without any issues. The table charset is utf8 and i use set names utf8 before the query. Any answers will help.

Without seeing the code, you will not get much help. Post some code that you are using, specifically where the data is input / put into the database and 5-10 lines before and after that.

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.