Upload csv to database but UTF8 encoding problem
-
Hi there,
I use both Japanese and English on my website and have my databases and WordPress set to the UTF-8 characterset.
Recently I wanted to add a ‘word of the day’ plugin and and trying to use the ‘Quotes Collection’ plugin from https://srinig.com/wordpress/plugins/quotes-collection/
The plugin has installed and works correctly. Furthermore, when I manually add a quote using Japanese characters via the user-friendly menu the plugin creates on the WordPress admin interface, everything works well.
However, the plugin does not allow you to upload a lot of quotes at once, so I tried uploading a csv file I created through phpmyadmin. I ensured that it was set to UTF-8 and tested it many times to ensure my comma separation was set correctly. I managed to import an entry, which displays fine in the phpmyadmin interface. However, when I check back in wordpress and on my website where the quote is displayed, it appears as scrambled question marks.
I have also tested this with a similar quotes plugin and the same thing happens. Somehow wordpress is not importing the characters correctly from the database.
Check the screenshots below for further clarification.
Screenshot1
https://michaeldowney.net/images/db-screen.jpgShows the phpmyadmin interface. ID 21 shows the quote added by uploading the csv file. It displays the Japanese characters correctly here, but not in the user interface inside the wordpress admin panel and, importantly, not on my blog.
Screenshot 2
https://michaeldowney.net/images/db-screen2.jpg
Shows the interface in wordpress. ID 20 is the quote I added manually through the user interface (NOT through the csv file). This displays correctly on my blog. You can see ID 21, which displayed correctly in the phpmyadmin panel, is now showing as scrambled questions marks: ???
***
Any ideas on what is going wrong? I am lost as to why, even though I have successfully imported a csv file into my database and have it showing correctly there, wordpress refuses to accept the UTF-8 Japanese characters in the admin panel… I wouldn’t need to worry about this if I only wanted to add a few quotes manually, but I plan to import a csv file of over 7000 Japanese words…
- The topic ‘Upload csv to database but UTF8 encoding problem’ is closed to new replies.