johnrb87 Posted July 8, 2010 Share Posted July 8, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/207139-storing-foreign-characters/ Share on other sites More sharing options...
premiso Posted July 8, 2010 Share Posted July 8, 2010 What is the column type of the other column is it just utf8 or utf8_bin? Quote Link to comment https://forums.phpfreaks.com/topic/207139-storing-foreign-characters/#findComment-1083059 Share on other sites More sharing options...
johnrb87 Posted July 8, 2010 Author Share Posted July 8, 2010 I've tried multiple types for the other column, but nothing seemed to work. Do you have any suggestions on what might be the best column type to try for multiple languages? Quote Link to comment https://forums.phpfreaks.com/topic/207139-storing-foreign-characters/#findComment-1083060 Share on other sites More sharing options...
johnrb87 Posted July 8, 2010 Author Share Posted July 8, 2010 I've tried most of them, but no luck with any I try. Any ideas? Or is this just not possible Quote Link to comment https://forums.phpfreaks.com/topic/207139-storing-foreign-characters/#findComment-1083093 Share on other sites More sharing options...
johnrb87 Posted July 8, 2010 Author Share Posted July 8, 2010 Seems like linestring works, is there any known issues with using linestring? Quote Link to comment https://forums.phpfreaks.com/topic/207139-storing-foreign-characters/#findComment-1083099 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.