Posted - 11/25/2019 : 02:32:55
Hi all:
Suddenly all Vietnamese writings in my website change into strings of weird characters. This happens only for those from database, but not on the ECT web pages. For years, it works fine, so I never pay attention to database character set or collation. I have tried the followings but failed to solve the problem.
1. Use Admin DB Utility and change the collation from the default latin1_swedish_ci to utf8b4_general_ci, utf8b4_Vietnamese_ci, utf8_Vietnamese_ci, and finally utf8_general_ci. 2 Use phMyAdmin and change the Server connection collation from default latin1_swedish_ci to utf8_general_ci. 3. Use CSV Product Data Utility to export the product table, correct the writings, and import the table. It still failed. 4. Create a new database, using phMyadmin to download all tables from old DB and upload to new DB. It still failed. 5. Can not use the built-in CSV file upload to update database with the table having 4 columns (Column list is: "#65279;pid,pname,pdescription,pcustom1"), the error is "Unknown column '#65279;pid' in 'field list'" 6. Open each product in Admin, correct the writing and save. The writing displays correctly. It would be painful to do this manually for a whole website !
For creating the csv file, I use the Unicode CSV Excel Addin to preserve all unicode characters when saving. (https://jaimonmathew.wordpress.com/2011/08/23/excel_addin_to_work_with_unicode_csv/)
Contact with BlueHost technical support, and they have no idea. I would appreciate if you can have some ideas to guide me solving this problem, and to avoid re-edit each product on the website.
ECT PHP v7.0.5 Database Server charset: UTF-8 Unicode (utf8) Web server PHP version: 7.2.7 phpMyAdmin Version information: 4.8.3
|