Jump to content

Recommended Posts

Hi all

 

I have a database table with a whole load of foreign words in it, they are basically company names and location names, but they are stored in different languages such as Indian, French, Arabic, Chinese and so on.

 

So for example, I have data such as

 

الفجيرة
Ra's al Khaymah

 

But in the database this data is stored as

 

"VARCHAR" with "utf8_bin"

 

and the data is stored like

 

الÙجيرة

 

 

This is fine, because it correctly decodes on the front end and the correct symbols etc.

 

My problem is that I want to have another column in the same database which shows the correct converted value, so in the database, it would look something like

 

الÙجيرة        الفجيرة

 

 

so on the left side, it would show the encoded value, and on the right side, it would have the true value.

 

I tried writing a script to grab the value from the table and then insert it into the same row, but whenever I try and pass

 

الفجيرة

 

though an "UPDATE" script, it keeps converting that value to

 

الÙجيرة

 

So my question is, is there anyway to tell PHP to insert

 

الفجيرة

 

into the database, rather than it inserting

 

الÙجيرة

 

instead???

 

Any help would be great.

 

Thanks

 

JohN

Link to comment
https://forums.phpfreaks.com/topic/207139-storing-foreign-characters/
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.