We have decided to transfer the original system from one server to another.
mysqldump-u root-p DBNAME --default-character-set=binary>~/DBNAME.sql
I imported it using phpMyAdmin because I couldn't type the command directly.
At this time, I tried utf8, sjis, binary, etc. for the "File Character Set:", but the results have not changed.
Test connection with Perl
When Perl connects to the database, there is no garbled characters in Japanese, and the migrated data is read beautifully.This is UTF8.
However, the actual system is PHP, so it was only a confirmation of operation.
Connect via PHP
When connected via PHP, the characters were already garbled at phpMyAdmin, and the desired system only has Japanese characters, so there is no sign of healing.
I tried it by using internet search.
Thank you for your cooperation.
I probably solved it myself, so I will answer it.
After adding the following code to the beginning, you can now display it without garbled characters.
This post was posted as a community wiki based on what @Monon added to the body of the question.
362 To Limit Column Values to Strings in a String List Using sqlalchemy
369 Update Flask User Information
353 I want to create an array of sequences from "1" to a specified number.
345 Who developed the "avformat-59.dll" that comes with FFmpeg?
355 Unity Virtual Stick Does Not Return to Center When You Release Your Finger
© 2023 OneMinuteCode. All rights reserved.